mirror of
https://github.com/python/cpython.git
synced 2025-07-24 19:54:21 +00:00
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.
This commit is contained in:
parent
2a5f656d0c
commit
0955f29703
1 changed files with 5 additions and 1 deletions
|
@ -24,7 +24,11 @@ class CompilerTest(unittest.TestCase):
|
|||
f = open(path)
|
||||
buf = f.read()
|
||||
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():
|
||||
test.test_support.requires("compiler")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue