Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c4e2a9b

Browse files
committed
Add a test file (which isn't run by regrtest) for bugs which
aren't fixed yet. Includes a first test (for compiler).
1 parent 6d0c85a commit c4e2a9b

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

Lib/test/outstanding_bugs.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
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+
9+
import unittest
10+
from test import test_support
11+
12+
class 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+
23+
def test_main():
24+
test_support.run_unittest(TestBug1385040)

0 commit comments

Comments
 (0)