Skip to content

Commit ab2594e

Browse files
committed
tests: Add test for exception-chaining raise syntax.
1 parent 2ff2ea5 commit ab2594e

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

tests/basics/exception_chain.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Exception chaining is not supported, but check that basic
2+
# exception works as expected.
3+
try:
4+
raise Exception from None
5+
except Exception:
6+
print("Caught Exception")
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Caught Exception
2+
Warning: exception chaining not supported

0 commit comments

Comments
 (0)