summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--tests/basics/exception_chain.py6
-rw-r--r--tests/basics/exception_chain.py.exp2
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/basics/exception_chain.py b/tests/basics/exception_chain.py
new file mode 100644
index 0000000000..c3a7d6b113
--- /dev/null
+++ b/tests/basics/exception_chain.py
@@ -0,0 +1,6 @@
+# Exception chaining is not supported, but check that basic
+# exception works as expected.
+try:
+ raise Exception from None
+except Exception:
+ print("Caught Exception")
diff --git a/tests/basics/exception_chain.py.exp b/tests/basics/exception_chain.py.exp
new file mode 100644
index 0000000000..80bcd5d0ea
--- /dev/null
+++ b/tests/basics/exception_chain.py.exp
@@ -0,0 +1,2 @@
+Caught Exception
+Warning: exception chaining not supported