mirror of https://github.com/python/cpython
add test for illegal imports
This commit is contained in:
parent
10f8ba4fc6
commit
ac25a38841
|
@ -36,6 +36,8 @@ continue_stmt
|
|||
return_stmt
|
||||
raise_stmt
|
||||
import_stmt
|
||||
SyntaxError expected for "def f(): from sys import *"
|
||||
SyntaxError expected for "def f(): global time; import "
|
||||
global_stmt
|
||||
exec_stmt
|
||||
if_stmt
|
||||
|
|
|
@ -367,6 +367,8 @@ import time, sys
|
|||
from time import time
|
||||
from sys import *
|
||||
from sys import path, argv
|
||||
check_syntax("def f(): from sys import *")
|
||||
check_syntax("def f(): global time; import ")
|
||||
|
||||
print 'global_stmt' # 'global' NAME (',' NAME)*
|
||||
def f():
|
||||
|
|
Loading…
Reference in New Issue