diff options
author | Éric Araujo <merwok@netwok.org> | 2011-10-09 06:55:04 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2011-10-09 06:55:04 (GMT) |
commit | 9255464dfb3a444eb5b7ea0a4e7c440d49a712be (patch) | |
tree | 9cededacec855c581a318f707d9d73480c14feeb /Lib/packaging/tests/test_command_build_py.py | |
parent | eaf139b3fc22be22e2c23d84d65a5c344df684a2 (diff) | |
parent | a29e4f64c1dfeb4ca1cf9f4c9636cb4528b2fd8c (diff) | |
download | cpython-9255464dfb3a444eb5b7ea0a4e7c440d49a712be.zip cpython-9255464dfb3a444eb5b7ea0a4e7c440d49a712be.tar.gz cpython-9255464dfb3a444eb5b7ea0a4e7c440d49a712be.tar.bz2 |
Branch merge
Diffstat (limited to 'Lib/packaging/tests/test_command_build_py.py')
-rw-r--r-- | Lib/packaging/tests/test_command_build_py.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/packaging/tests/test_command_build_py.py b/Lib/packaging/tests/test_command_build_py.py index 4eeb34e..a978c91 100644 --- a/Lib/packaging/tests/test_command_build_py.py +++ b/Lib/packaging/tests/test_command_build_py.py @@ -2,6 +2,7 @@ import os import sys +import imp from packaging.command.build_py import build_py from packaging.dist import Distribution @@ -58,13 +59,15 @@ class BuildPyTestCase(support.TempdirManager, self.assertEqual(len(cmd.get_outputs()), 3) pkgdest = os.path.join(destination, "pkg") files = os.listdir(pkgdest) + pycache_dir = os.path.join(pkgdest, "__pycache__") self.assertIn("__init__.py", files) self.assertIn("README.txt", files) - # XXX even with -O, distutils writes pyc, not pyo; bug? if sys.dont_write_bytecode: - self.assertNotIn("__init__.pyc", files) + self.assertFalse(os.path.exists(pycache_dir)) else: - self.assertIn("__init__.pyc", files) + # XXX even with -O, packaging writes pyc, not pyo; bug? + pyc_files = os.listdir(pycache_dir) + self.assertIn("__init__.%s.pyc" % imp.get_tag(), pyc_files) def test_empty_package_dir(self): # See SF 1668596/1720897. |