Przeglądaj źródła

Add sample test for assertions with messages

aps 3 lat temu
rodzic
commit
ac9640f73e
1 zmienionych plików z 8 dodań i 1 usunięć
  1. 8 1
      tests/_exception.py

+ 8 - 1
tests/_exception.py

@@ -41,4 +41,11 @@ def f1():
 try:
     f1()
 except KeyError:
-    print("PASS 04")
+    print("PASS 04")
+
+
+assert True, "Msg"
+try:
+    assert False, "Msg"
+except AssertionError:
+    print("PASS 05")