Skip to content

Commit 019de55

Browse files
committed
python(test): don't write bytecode
Tests are usually lauched from source directory, so additional unnecessary files should be eliminated. Alternative ways (command line): - python -B ... - PYTHONDONTWRITEBYTECODE=1 python ...
1 parent 3ee8079 commit 019de55

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/python/test/test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
from __future__ import print_function
44

5+
import sys
6+
sys.dont_write_bytecode = True # Don't generate .pyc files / __pycache__ directories
7+
58
import os
69
import unittest
710

0 commit comments

Comments
 (0)