mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 12:10:13 +01:00
tests: Add test for exception-chaining raise syntax.
This commit is contained in:
6
tests/basics/exception_chain.py
Normal file
6
tests/basics/exception_chain.py
Normal file
@@ -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")
|
||||||
2
tests/basics/exception_chain.py.exp
Normal file
2
tests/basics/exception_chain.py.exp
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Caught Exception
|
||||||
|
Warning: exception chaining not supported
|
||||||
Reference in New Issue
Block a user