From: Peter Schneider-Kamp Date: Tue, 25 Jul 2000 22:15:45 +0000 (+0000) Subject: added test case for fixed duplicate arguments bug in Python/compile.c X-Git-Tag: v2.0b1~717 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fdee0f0aa779fbe648cebe68878e9be5dc47e0bd;p=thirdparty%2FPython%2Fcpython.git added test case for fixed duplicate arguments bug in Python/compile.c --- diff --git a/Lib/test/output/test_compile b/Lib/test/output/test_compile new file mode 100644 index 000000000000..357f96d4b88f --- /dev/null +++ b/Lib/test/output/test_compile @@ -0,0 +1 @@ +test_compile diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py new file mode 100644 index 000000000000..8905864a9145 --- /dev/null +++ b/Lib/test/test_compile.py @@ -0,0 +1,16 @@ +from test_support import 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