소스 검색

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")