summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/try_error.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basics/try_error.py')
-rw-r--r--tests/basics/try_error.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/basics/try_error.py b/tests/basics/try_error.py
new file mode 100644
index 0000000000..ca2a6f2030
--- /dev/null
+++ b/tests/basics/try_error.py
@@ -0,0 +1,17 @@
+# test bad exception match
+
+try:
+ try:
+ a
+ except 1:
+ pass
+except TypeError:
+ print("TypeError")
+
+try:
+ try:
+ a
+ except (1,):
+ pass
+except TypeError:
+ print("TypeError")