From 214179b430ebc1101e28b19248b6166f5e511e6b Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 25 Mar 2015 23:10:09 +0000 Subject: tests: Add tests for SyntaxError, TypeError, and other missing things. This is intended to improve coverage of the test suite. --- tests/basics/try_error.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/basics/try_error.py (limited to 'tests/basics/try_error.py') 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") -- cgit v1.2.3