Browse Source

first commit

Abbas AHMAD 1 year ago
commit
dee2af8e06
2 changed files with 36 additions and 0 deletions
  1. 1 0
      .gitignore
  2. 35 0
      test_math.py

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+__pycache__

+ 35 - 0
test_math.py

@@ -0,0 +1,35 @@
+import math
+import logging
+
+def test_logging():
+   logging.basicConfig(level=logging.DEBUG)
+   logging.debug("Debug")
+   logging.info("Message info")
+   logging.warning("Message Warning")
+   logging.error("Message Error")
+   logging.critical("Message Critical")
+
+def test_sqrt():
+   num = 25
+   assert math.sqrt(num) == 5
+
+def testsquare():
+   num = 7
+   assert 7*7 == 49
+
+def test_greater():
+   num = 101
+   assert num > 100
+
+def test_greater_equal():
+   num = 100
+   assert num >= 100
+
+def test_less():
+   num = 100
+   assert num < 200
+
+def test_equal():
+   logging.info("Test Equal")
+   num = 100
+   assert num == 100