]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix omission in test for packaging install_distinfo command.
authorÉric Araujo <merwok@netwok.org>
Fri, 10 Jun 2011 01:53:49 +0000 (03:53 +0200)
committerÉric Araujo <merwok@netwok.org>
Fri, 10 Jun 2011 01:53:49 +0000 (03:53 +0200)
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.

Lib/packaging/tests/test_command_install_distinfo.py

index 6d40f66d92ab4b7800765a62cc53ec9f6296db90..ade191c57a0e9bb9bdffd882d25b459ec200bd52 100644 (file)
@@ -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: