test_math.py 760 B

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