blob: adcf7c00c7e12fa06e3dc52aea101d1762adaea7 [file] [log] [blame]
Tim Petersa28ad772006-01-13 03:05:25 +00001#
2# This file is for everybody to add tests for bugs that aren't
3# fixed yet. Please add a test case and appropriate bug description.
4#
5# When you fix one of the bugs, please move the test to the correct
6# test_ module.
7#
8
9import unittest
10from test import test_support
11
12class TestBug1385040(unittest.TestCase):
13 def testSyntaxError(self):
14 import compiler
15
16 # The following snippet gives a SyntaxError in the interpreter
17 #
18 # If you compile and exec it, the call foo(7) returns (7, 1)
19 self.assertRaises(SyntaxError, compiler.compile,
20 "def foo(a=1, b): return a, b\n\n", "<string>", "exec")
21
22
23def test_main():
24 test_support.run_unittest(TestBug1385040)
25
26if __name__ == "__main__":
27 test_main()