diff options
Diffstat (limited to 'Lib/test/test_compiler.py')
-rw-r--r-- | Lib/test/test_compiler.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_compiler.py b/Lib/test/test_compiler.py index 6ec71ed38f..5e7b15c38c 100644 --- a/Lib/test/test_compiler.py +++ b/Lib/test/test_compiler.py @@ -20,7 +20,7 @@ class CompilerTest(unittest.TestCase): for basename in os.listdir(dir): if not basename.endswith(".py"): continue - if not TEST_ALL and random() < 0.98 and basename != "test_with.py": + if not TEST_ALL and random() < 0.98: continue path = os.path.join(dir, basename) if test.test_support.verbose: @@ -43,6 +43,9 @@ class CompilerTest(unittest.TestCase): def testNewClassSyntax(self): compiler.compile("class foo():pass\n\n","<string>","exec") + def testYieldExpr(self): + compiler.compile("def g(): yield\n\n", "<string>", "exec") + def testLineNo(self): # Test that all nodes except Module have a correct lineno attribute. filename = __file__ |