diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-09-01 10:38:09 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-09-01 10:39:11 +0300 |
commit | ab2594e341f84b74634d21413e9559fa92e5cbbe (patch) | |
tree | e3ac306f6e677d2a8883035ac54c2ba5c56e680d /tests/basics | |
parent | 2ff2ea5f3b1904834b287e74415f329b31d9a3db (diff) | |
download | micropython-ab2594e341f84b74634d21413e9559fa92e5cbbe.tar.gz micropython-ab2594e341f84b74634d21413e9559fa92e5cbbe.zip |
tests: Add test for exception-chaining raise syntax.
Diffstat (limited to 'tests/basics')
-rw-r--r-- | tests/basics/exception_chain.py | 6 | ||||
-rw-r--r-- | tests/basics/exception_chain.py.exp | 2 |
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 |