Преглед изворни кода

Add sample test for assertions with messages

aps пре 3 година
родитељ
комит
ac9640f73e
1 измењених фајлова са 8 додато и 1 уклоњено
  1. 8 1
      tests/_exception.py

+ 8 - 1
tests/_exception.py

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