summaryrefslogtreecommitdiffstats
path: root/tests/QtGui/pyside_reload_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtGui/pyside_reload_test.py')
-rw-r--r--tests/QtGui/pyside_reload_test.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/QtGui/pyside_reload_test.py b/tests/QtGui/pyside_reload_test.py
index 3fd593c..7fc4748 100644
--- a/tests/QtGui/pyside_reload_test.py
+++ b/tests/QtGui/pyside_reload_test.py
@@ -23,13 +23,14 @@ def increment_module_value():
modfile.write('Sentinel.value += 1' + os.linesep)
modfile.flush()
modfile.close()
- if py3k.IS_PY3K:
- import imp
- cacheFile = imp.cache_from_source(dst)
- else:
- cacheFile = dst + 'c'
- os.remove(cacheFile)
+ if not sys.dont_write_bytecode:
+ if py3k.IS_PY3K:
+ import imp
+ cacheFile = imp.cache_from_source(dst)
+ else:
+ cacheFile = dst + 'c'
+ os.remove(cacheFile)
class TestModuleReloading(unittest.TestCase):