diff options
-rw-r--r-- | Lib/test/test_compiler.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_compiler.py b/Lib/test/test_compiler.py index c328d71..f58e6e5 100644 --- a/Lib/test/test_compiler.py +++ b/Lib/test/test_compiler.py @@ -32,7 +32,11 @@ class CompilerTest(unittest.TestCase): self.assertRaises(SyntaxError, compiler.compile, buf, basename, "exec") else: - compiler.compile(buf, basename, "exec") + try: + compiler.compile(buf, basename, "exec") + except Exception, e: + e.args[0] += "[in file %s]" % basename + raise def testNewClassSyntax(self): compiler.compile("class foo():pass\n\n","<string>","exec") |