aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_compiler.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_compiler.py')
-rw-r--r--Lib/test/test_compiler.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_compiler.py b/Lib/test/test_compiler.py
index a59d6aa7bac..48f1643be89 100644
--- a/Lib/test/test_compiler.py
+++ b/Lib/test/test_compiler.py
@@ -26,6 +26,7 @@ class CompilerTest(unittest.TestCase):
next_time = time.time() + _PRINT_WORKING_MSG_INTERVAL
print >>sys.__stdout__, \
' testCompileLibrary still working, be patient...'
+ sys.__stdout__.flush()
if not basename.endswith(".py"):
continue
@@ -55,6 +56,9 @@ class CompilerTest(unittest.TestCase):
def testYieldExpr(self):
compiler.compile("def g(): yield\n\n", "<string>", "exec")
+ def testDefaultArgs(self):
+ self.assertRaises(SyntaxError, compiler.parse, "def foo(a=1, b): pass")
+
def testLineNo(self):
# Test that all nodes except Module have a correct lineno attribute.
filename = __file__