summaryrefslogtreecommitdiffstats
path: root/Lib/packaging/tests/test_command_install_distinfo.py
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-06-10 01:53:49 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-06-10 01:53:49 (GMT)
commitf53cd89006ccd2144e5707c3fd4ccf5c96a3ec20 (patch)
tree9324c162f9ee473491e3ab5700460346c3c71251 /Lib/packaging/tests/test_command_install_distinfo.py
parentedd95dd3cb205be06270ca7e79467917bd7d3783 (diff)
downloadcpython-f53cd89006ccd2144e5707c3fd4ccf5c96a3ec20.zip
cpython-f53cd89006ccd2144e5707c3fd4ccf5c96a3ec20.tar.gz
cpython-f53cd89006ccd2144e5707c3fd4ccf5c96a3ec20.tar.bz2
Fix omission in test for packaging install_distinfo command.
The code does not write checksum or file length for .pyc and .pyo in the RECORD file, in compliance with PEP 376, but the test forgot to take .pyo into account. This was not caught because there were no .pyo in the checkout, but after installing there are .pyo files created by compileall, and the test picks them up.
Diffstat (limited to 'Lib/packaging/tests/test_command_install_distinfo.py')
-rw-r--r--Lib/packaging/tests/test_command_install_distinfo.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/packaging/tests/test_command_install_distinfo.py b/Lib/packaging/tests/test_command_install_distinfo.py
index 6d40f66..ade191c 100644
--- a/Lib/packaging/tests/test_command_install_distinfo.py
+++ b/Lib/packaging/tests/test_command_install_distinfo.py
@@ -162,7 +162,7 @@ class InstallDistinfoTestCase(support.TempdirManager,
expected = []
for f in install.get_outputs():
- if (f.endswith('.pyc') or f == os.path.join(
+ if (f.endswith(('.pyc', '.pyo')) or f == os.path.join(
install_dir, 'foo-1.0.dist-info', 'RECORD')):
expected.append([f, '', ''])
else: