From 5faf7bbc6c165629f8556a17c5a49407b12d0e54 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Sun, 5 Feb 2023 21:44:07 +0800 Subject: [PATCH] Update _exception.py --- tests/_exception.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/tests/_exception.py b/tests/_exception.py index 46f8f18a..fef26322 100644 --- a/tests/_exception.py +++ b/tests/_exception.py @@ -24,4 +24,21 @@ def f(): print("PASS 03") assert True -f() \ No newline at end of file +f() + +def f1(): + try: + assert 1 + 2 == 3 + try: + a = {1: 2, 3: 4} + x = a[0] + except A: + print('') + except B: + print('') + print('') + +try: + f1() +except KeyError: + print("PASS 04") \ No newline at end of file