2 """test script for a few new invalid token catches"""
5 from test
import test_support
7 class EOFTestCase(unittest
.TestCase
):
9 expect
= "EOL while scanning string literal (<string>, line 1)"
11 eval("""'this is a test\
13 except SyntaxError, msg
:
14 self
.assertEqual(str(msg
), expect
)
16 raise test_support
.TestFailed
19 expect
= ("EOF while scanning triple-quoted string literal "
22 eval("""'''this is a test""")
23 except SyntaxError, msg
:
24 self
.assertEqual(str(msg
), expect
)
26 raise test_support
.TestFailed
29 test_support
.run_unittest(EOFTestCase
)
31 if __name__
== "__main__":