Explorar o código

Add sample test for assertions with messages

aps %!s(int64=3) %!d(string=hai) anos
pai
achega
ac9640f73e
Modificáronse 1 ficheiros con 8 adicións e 1 borrados
  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")