mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Fix SF bug [ #450245 ] Error in parsing future stmts
Add test case to cover multiple future statements on separate lines of a module.
This commit is contained in:
parent
1e35ce58e8
commit
8471a35feb
3 changed files with 5 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
test_future
|
||||
6
|
||||
6
|
||||
2
|
||||
SyntaxError badsyntax_future3 3
|
||||
SyntaxError badsyntax_future4 3
|
||||
SyntaxError badsyntax_future5 4
|
||||
|
|
|
@ -214,6 +214,7 @@ NOTTESTS = [
|
|||
'test_b2',
|
||||
'test_future1',
|
||||
'test_future2',
|
||||
'test_future3',
|
||||
]
|
||||
|
||||
def findtests(testdir=None, stdtests=STDTESTS, nottests=NOTTESTS):
|
||||
|
|
|
@ -17,6 +17,9 @@ import test_future1
|
|||
unload('test_future2')
|
||||
import test_future2
|
||||
|
||||
unload('test_future3')
|
||||
import test_future3
|
||||
|
||||
# The remaining tests should fail
|
||||
try:
|
||||
import badsyntax_future3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue