summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_compile.py
blob: fa608b1b90f4d432d65375aeb25eff064d66e02c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from test_support import verify, verbose, TestFailed

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