ソースを参照

Update _exception.py

blueloveTH 3 年 前
コミット
5faf7bbc6c
1 ファイル変更18 行追加1 行削除
  1. 18 1
      tests/_exception.py

+ 18 - 1
tests/_exception.py

@@ -24,4 +24,21 @@ def f():
         print("PASS 03")
     assert True
 
-f()
+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")