summaryrefslogtreecommitdiff
path: root/Lib/test/test_compiler.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2004-08-08 16:32:54 +0000
committerTim Peters <tim.peters@gmail.com>2004-08-08 16:32:54 +0000
commitb6ecc165f289b488f729bc23fb95c75cc6a36612 (patch)
treee6b2c0d3f672b674513fff1950b157095e8b8b58 /Lib/test/test_compiler.py
parent83b57355a8ec7435ac6a64bab977a61f8c98ef24 (diff)
downloadcpython-git-b6ecc165f289b488f729bc23fb95c75cc6a36612.tar.gz
In verbose mode, display the name of each file before trying to compile
it. Else when this fails, there's no way to tell which file it was chewing on.
Diffstat (limited to 'Lib/test/test_compiler.py')
-rw-r--r--Lib/test/test_compiler.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_compiler.py b/Lib/test/test_compiler.py
index fc6fdf83d7..f11bad6c51 100644
--- a/Lib/test/test_compiler.py
+++ b/Lib/test/test_compiler.py
@@ -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")