[Python-checkins] cpython: Fix omission in test for packaging install_distinfo command.

eric.araujo python-checkins at python.org
Fri Jun 10 18:35:06 CEST 2011


http://hg.python.org/cpython/rev/9041520be581
changeset:   70762:9041520be581
user:        Éric Araujo <merwok at netwok.org>
date:        Fri Jun 10 03:53:49 2011 +0200
summary:
  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.

files:
  Lib/packaging/tests/test_command_install_distinfo.py |  2 +-
  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
--- a/Lib/packaging/tests/test_command_install_distinfo.py
+++ b/Lib/packaging/tests/test_command_install_distinfo.py
@@ -162,7 +162,7 @@
 
         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:

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list