2001-01-17 19:11:13 +00:00
|
|
|
from test_support import verify, verbose, TestFailed
|
2000-07-25 22:15:45 +00:00
|
|
|
|
|
|
|
if verbose:
|
|
|
|
print 'Running test on duplicate arguments'
|
|
|
|
|
|
|
|
try:
|
|
|
|
exec('def f(a, a): pass')
|
|
|
|
raise TestFailed, "duplicate arguments"
|
|
|
|
except SyntaxError:
|
|
|
|
pass
|
|
|
|
|
|
|
|
try:
|
|
|
|
exec('def f(a = 0, a = 1): pass')
|
|
|
|
raise TestFailed, "duplicate keyword arguments"
|
|
|
|
except SyntaxError:
|
|
|
|
pass
|