]> granicus.if.org Git - python/commitdiff
Fix a comment to state the right thing.
authorBrett Cannon <bcannon@gmail.com>
Sat, 15 May 2010 22:51:45 +0000 (22:51 +0000)
committerBrett Cannon <bcannon@gmail.com>
Sat, 15 May 2010 22:51:45 +0000 (22:51 +0000)
Lib/test/test_import.py

index 2ea673637a8e5af0031f482baa0c737e68623ea4..bf689aea4ceac3af311b567947dbea1162de9e11 100644 (file)
@@ -153,10 +153,9 @@ class ImportTests(unittest.TestCase):
                 f.write('"",\n')
             f.write(']')
 
-        # Compile & remove .py file, we only need .pyc (or .pyo), but that
-        # must be relocated to the PEP 3147 bytecode-only location.
-        with open(filename, 'r') as f:
-            py_compile.compile(filename)
+        # Compile & remove .py file; we only need .pyc (or .pyo).
+        # Bytecode must be relocated from the PEP 3147 bytecode-only location.
+        py_compile.compile(filename)
         unlink(filename)
         make_legacy_pyc(filename)