diff options
author | Peter Schneider-Kamp <nowonder@nowonder.de> | 2000-07-25 22:15:45 +0000 |
---|---|---|
committer | Peter Schneider-Kamp <nowonder@nowonder.de> | 2000-07-25 22:15:45 +0000 |
commit | fdee0f0aa779fbe648cebe68878e9be5dc47e0bd (patch) | |
tree | 99ecadd78dd7aec99b13e8741c9c9ff1ba21b0bd | |
parent | 1cb3a9ecef81ac9c3f51e336c7155b2312f47f6d (diff) | |
download | cpython-git-fdee0f0aa779fbe648cebe68878e9be5dc47e0bd.tar.gz |
added test case for fixed duplicate arguments bug in Python/compile.c
-rw-r--r-- | Lib/test/output/test_compile | 1 | ||||
-rw-r--r-- | Lib/test/test_compile.py | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/Lib/test/output/test_compile b/Lib/test/output/test_compile new file mode 100644 index 0000000000..357f96d4b8 --- /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 0000000000..8905864a91 --- /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 |