Peter Schneider-Kamp | fdee0f0 | 2000-07-25 22:15:45 +0000 | [diff] [blame] | 1 | from test_support import verbose, TestFailed |
2 | |||||
3 | if verbose: | ||||
4 | print 'Running test on duplicate arguments' | ||||
5 | |||||
6 | try: | ||||
7 | exec('def f(a, a): pass') | ||||
8 | raise TestFailed, "duplicate arguments" | ||||
9 | except SyntaxError: | ||||
10 | pass | ||||
11 | |||||
12 | try: | ||||
13 | exec('def f(a = 0, a = 1): pass') | ||||
14 | raise TestFailed, "duplicate keyword arguments" | ||||
15 | except SyntaxError: | ||||
16 | pass |