diff options
author | Fred Drake <fdrake@acm.org> | 2004-07-21 18:53:06 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2004-07-21 18:53:06 (GMT) |
commit | b3d55d31d91ca4607847c0d872c4cf72ed794e35 (patch) | |
tree | 22e82fbfcc8957aea52bd232be9c1c65c5777ab0 /Lib/distutils/tests | |
parent | 4ab0e9e5412f8779a77b10de2c57182decb3c29f (diff) | |
download | cpython-b3d55d31d91ca4607847c0d872c4cf72ed794e35.zip cpython-b3d55d31d91ca4607847c0d872c4cf72ed794e35.tar.gz cpython-b3d55d31d91ca4607847c0d872c4cf72ed794e35.tar.bz2 |
elaborate package data test to make sure get_outputs() gives the right
results when byte-code compilation is requested (in particular, make
sure that package data doesn't get a bogus byte-code listing
generated)
Diffstat (limited to 'Lib/distutils/tests')
-rw-r--r-- | Lib/distutils/tests/test_build_py.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/distutils/tests/test_build_py.py b/Lib/distutils/tests/test_build_py.py index 757d757..6f72768 100644 --- a/Lib/distutils/tests/test_build_py.py +++ b/Lib/distutils/tests/test_build_py.py @@ -34,15 +34,21 @@ class BuildPyTestCase(support.TempdirManager, unittest.TestCase): dist.package_dir = {"pkg": sources} cmd = build_py(dist) + cmd.compile = 1 cmd.ensure_finalized() self.assertEqual(cmd.package_data, dist.package_data) cmd.run() - self.assertEqual(len(cmd.get_outputs()), 2) + # This makes sure the list of outputs includes byte-compiled + # files for Python modules but not for package data files + # (there shouldn't *be* byte-code files for those!). + # + self.assertEqual(len(cmd.get_outputs()), 3) pkgdest = os.path.join(destination, "pkg") files = os.listdir(pkgdest) self.assert_("__init__.py" in files) + self.assert_("__init__.pyc" in files) self.assert_("README.txt" in files) |