diff options
| author | Ezio Melotti <ezio.melotti@gmail.com> | 2013-03-16 21:50:04 +0200 |
|---|---|---|
| committer | Ezio Melotti <ezio.melotti@gmail.com> | 2013-03-16 21:50:04 +0200 |
| commit | 469da97c1e7b1a36771ed6fe819473ba81569422 (patch) | |
| tree | 3ef7b602007ddd6e0d8d5fe48ac9a03d5e29a14e /Lib/test/test_imp.py | |
| parent | 2d6acd2ac2399ecc0f163c12c5695f434ba14955 (diff) | |
| parent | e5e7a7cbf450f80fa9a88038878b6bd525313f37 (diff) | |
| download | cpython-git-469da97c1e7b1a36771ed6fe819473ba81569422.tar.gz | |
#11420: merge with 3.3.
Diffstat (limited to 'Lib/test/test_imp.py')
| -rw-r--r-- | Lib/test/test_imp.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_imp.py b/Lib/test/test_imp.py index 52c4399a71..2d75724771 100644 --- a/Lib/test/test_imp.py +++ b/Lib/test/test_imp.py @@ -162,8 +162,10 @@ class ImportTests(unittest.TestCase): with warnings.catch_warnings(): warnings.simplefilter('ignore') - mod = imp.load_compiled( - temp_mod_name, imp.cache_from_source(temp_mod_name + '.py')) + if not sys.dont_write_bytecode: + mod = imp.load_compiled( + temp_mod_name, + imp.cache_from_source(temp_mod_name + '.py')) self.assertEqual(mod.a, 1) if not os.path.exists(test_package_name): |
