Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74ef694 commit 39cdfffCopy full SHA for 39cdfff
1 file changed
Lib/test/test_compiler.py
@@ -12,7 +12,6 @@ def testCompileLibrary(self):
12
# standard library and its test suite. This doesn't verify
13
# that any of the code is correct, merely the compiler is able
14
# to generate some kind of code for it.
15
-
16
libdir = os.path.dirname(unittest.__file__)
17
testdir = os.path.dirname(test.test_support.__file__)
18
@@ -36,6 +35,10 @@ def testCompileLibrary(self):
36
35
37
def testNewClassSyntax(self):
38
compiler.compile("class foo():pass\n\n","<string>","exec")
+
39
+ def testSyntaxErrors(self):
40
+ self.assertRaises(SyntaxError, compiler.compile,
41
+ "def foo(a=1,b):pass\n\n", "<string>", "exec")
42
43
def testLineNo(self):
44
# Test that all nodes except Module have a correct lineno attribute.
0 commit comments