diff options
author | Georg Brandl <georg@python.org> | 2011-02-07 12:36:54 +0000 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2011-02-07 12:36:54 +0000 |
commit | 4543846517cbb5defb00f1bae82edd30e1280d9e (patch) | |
tree | 0dc95793008454a07c4f80034fb03db70d8f3396 /Lib/test/test_compileall.py | |
parent | #8691: document that right alignment is default for numbers. (diff) | |
download | cpython-4543846517cbb5defb00f1bae82edd30e1280d9e.tar.gz cpython-4543846517cbb5defb00f1bae82edd30e1280d9e.tar.bz2 cpython-4543846517cbb5defb00f1bae82edd30e1280d9e.zip |
#11132: pass optimize parameter to recursive call in compileall.compile_dir(). Reviewed by Eric A.
Diffstat (limited to 'Lib/test/test_compileall.py')
-rw-r--r-- | Lib/test/test_compileall.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_compileall.py b/Lib/test/test_compileall.py index 295dc400671..250d31b42e4 100644 --- a/Lib/test/test_compileall.py +++ b/Lib/test/test_compileall.py @@ -24,6 +24,10 @@ class CompileallTests(unittest.TestCase): self.source_path2 = os.path.join(self.directory, '_test2.py') self.bc_path2 = imp.cache_from_source(self.source_path2) shutil.copyfile(self.source_path, self.source_path2) + self.subdirectory = os.path.join(self.directory, '_subdir') + os.mkdir(self.subdirectory) + self.source_path3 = os.path.join(self.subdirectory, '_test3.py') + shutil.copyfile(self.source_path, self.source_path3) def tearDown(self): shutil.rmtree(self.directory) @@ -96,6 +100,12 @@ class CompileallTests(unittest.TestCase): cached = imp.cache_from_source(self.source_path, debug_override=not optimize) self.assertTrue(os.path.isfile(cached)) + cached2 = imp.cache_from_source(self.source_path2, + debug_override=not optimize) + self.assertTrue(os.path.isfile(cached2)) + cached3 = imp.cache_from_source(self.source_path3, + debug_override=not optimize) + self.assertTrue(os.path.isfile(cached3)) class EncodingTest(unittest.TestCase): |