blob: be71fde48c515adbd21bdd3c38d57e3908c8588b [file] [log] [blame]
Georg Brandlc4e2a9b2006-01-08 14:32:19 +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)