summaryrefslogtreecommitdiffstats
path: root/Lib/packaging/tests
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-05-28 22:56:39 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-05-28 22:56:39 (GMT)
commit601aba6f15fe77b9ebfd40b8324d789e4250a194 (patch)
treef7fe470f0bc52558263b6b212f59033d7e461fa4 /Lib/packaging/tests
parent05010706697ce9c18e7f8a8e571753b0bcfd6548 (diff)
parentc5069e00705a499c2db37deb5d0eefae791d39ea (diff)
downloadcpython-601aba6f15fe77b9ebfd40b8324d789e4250a194.zip
cpython-601aba6f15fe77b9ebfd40b8324d789e4250a194.tar.gz
cpython-601aba6f15fe77b9ebfd40b8324d789e4250a194.tar.bz2
Merge touch-ups and fixes for #9831 (+port fix to packaging) and #9223 from 3.2
Diffstat (limited to 'Lib/packaging/tests')
-rw-r--r--Lib/packaging/tests/test_command_build_py.py9
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 b6d60de..49069f5 100644
--- a/Lib/packaging/tests/test_command_build_py.py
+++ b/Lib/packaging/tests/test_command_build_py.py
@@ -61,9 +61,12 @@ class BuildPyTestCase(support.TempdirManager,
pkgdest = os.path.join(destination, "pkg")
files = os.listdir(pkgdest)
self.assertIn("__init__.py", files)
- if not sys.dont_write_bytecode:
- self.assertIn("__init__.pyc", 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)
+ else:
+ self.assertIn("__init__.pyc", files)
def test_empty_package_dir(self):
# See SF 1668596/1720897.
@@ -93,7 +96,7 @@ class BuildPyTestCase(support.TempdirManager,
try:
dist.run_commands()
- except PackagingFileError as e:
+ except PackagingFileError:
self.fail("failed package_data test when package_dir is ''")
finally:
# Restore state.