]> granicus.if.org Git - python/commitdiff
In verbose mode, display the name of each file before trying to compile
authorTim Peters <tim.peters@gmail.com>
Sun, 8 Aug 2004 16:32:54 +0000 (16:32 +0000)
committerTim Peters <tim.peters@gmail.com>
Sun, 8 Aug 2004 16:32:54 +0000 (16:32 +0000)
it.  Else when this fails, there's no way to tell which file it was
chewing on.

Lib/test/test_compiler.py

index fc6fdf83d7d7a8f987a91b2af50721786882946c..f11bad6c51570c4468e03116bf7331d092f8c5bb 100644 (file)
@@ -18,7 +18,10 @@ class CompilerTest(unittest.TestCase):
             for path in os.listdir(dir):
                 if not path.endswith(".py"):
                     continue
-                f = open(os.path.join(dir, path), "r")
+                fpath = os.path.join(dir, path)
+                if test.test_support.verbose:
+                    print "compiling", fpath
+                f = open(fpath)
                 buf = f.read()
                 f.close()
                 compiler.compile(buf, path, "exec")