summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/output/test_compile1
-rw-r--r--Lib/test/test_compile.py16
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 0000000..357f96d
--- /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 0000000..8905864
--- /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