From 8471a35febdbfbfab51b9d4b5fe51694fe6ca536 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Mon, 20 Aug 2001 20:33:42 +0000 Subject: [PATCH] Fix SF bug [ #450245 ] Error in parsing future stmts Add test case to cover multiple future statements on separate lines of a module. --- Lib/test/output/test_future | 1 + Lib/test/regrtest.py | 1 + Lib/test/test_future.py | 3 +++ 3 files changed, 5 insertions(+) diff --git a/Lib/test/output/test_future b/Lib/test/output/test_future index 4631489a882..127517d0716 100644 --- a/Lib/test/output/test_future +++ b/Lib/test/output/test_future @@ -1,6 +1,7 @@ test_future 6 6 +2 SyntaxError badsyntax_future3 3 SyntaxError badsyntax_future4 3 SyntaxError badsyntax_future5 4 diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 4c7b4bee398..6a4b7fdd493 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -214,6 +214,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, 'test_b2', 'test_future1', 'test_future2', + 'test_future3', ] def findtests(testdir=None, stdtests=STDTESTS, nottests=NOTTESTS): diff --git a/Lib/test/test_future.py b/Lib/test/test_future.py index ba0763b7c71..764584c10a0 100644 --- a/Lib/test/test_future.py +++ b/Lib/test/test_future.py @@ -17,6 +17,9 @@ def check_error_location(msg): unload('test_future2') import test_future2 +unload('test_future3') +import test_future3 + # The remaining tests should fail try: import badsyntax_future3