test_math.py 620 B

1234567891011121314151617181920212223242526272829303132333435
  1. import math
  2. import logging
  3. def test_logging():
  4. logging.basicConfig(level=logging.DEBUG)
  5. logging.debug("Debug")
  6. logging.info("Message info")
  7. logging.warning("Message Warning")
  8. logging.error("Message Error")
  9. logging.critical("Message Critical")
  10. def test_sqrt():
  11. num = 25
  12. assert math.sqrt(num) == 5
  13. def testsquare():
  14. num = 7
  15. assert 7*7 == 49
  16. def test_greater():
  17. num = 101
  18. assert num > 100
  19. def test_greater_equal():
  20. num = 100
  21. assert num >= 100
  22. def test_less():
  23. num = 100
  24. assert num < 200
  25. def test_equal():
  26. logging.info("Test Equal")
  27. num = 100
  28. assert num == 100