mirror of https://github.com/python/cpython.git
parent
c862cf400f
commit
047e2c93e2
|
@ -1,7 +1,7 @@
|
|||
from test_support import verbose, TestFailed
|
||||
|
||||
if verbose:
|
||||
print 'Running test on duplicate arguments'
|
||||
print 'Running tests on argument handling'
|
||||
|
||||
try:
|
||||
exec('def f(a, a): pass')
|
||||
|
@ -14,3 +14,9 @@
|
|||
raise TestFailed, "duplicate keyword arguments"
|
||||
except SyntaxError:
|
||||
pass
|
||||
|
||||
try:
|
||||
exec('def f(a): global a; a = 1')
|
||||
raise TestFailed, "variable is global and local"
|
||||
except SyntaxError:
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue