Commit 0955f297 authored by Tim Peters's avatar Tim Peters

Tell unittest that source files with "badsyntax" in their names should

raise SyntaxError.  test_compiler passes now on WinXP, at least in a
release-build non-O run.
parent 2a5f656d
...@@ -24,7 +24,11 @@ class CompilerTest(unittest.TestCase): ...@@ -24,7 +24,11 @@ class CompilerTest(unittest.TestCase):
f = open(path) f = open(path)
buf = f.read() buf = f.read()
f.close() f.close()
compiler.compile(buf, basename, "exec") if "badsyntax" in basename:
self.assertRaises(SyntaxError, compiler.compile,
buf, basename, "exec")
else:
compiler.compile(buf, basename, "exec")
def test_main(): def test_main():
test.test_support.requires("compiler") test.test_support.requires("compiler")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment