]> granicus.if.org Git - python/commitdiff
test_ast: pass the filename to ast.parse()
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 21 Mar 2013 23:06:20 +0000 (00:06 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 21 Mar 2013 23:06:20 +0000 (00:06 +0100)
Lib/test/test_ast.py

index 8e105b24324b7b0fee4f854f22687d292d085778..c45326f4b4e2ee777e4cdde722c16c445cd1b92e 100644 (file)
@@ -947,7 +947,7 @@ class ASTValidatorTests(unittest.TestCase):
             fn = os.path.join(stdlib, module)
             with open(fn, "r", encoding="utf-8") as fp:
                 source = fp.read()
-            mod = ast.parse(source)
+            mod = ast.parse(source, fn)
             compile(mod, fn, "exec")