Advertisement
Guest User

Untitled

a guest
Aug 16th, 2023
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.78 KB | None | 0 0
  1. import sys
  2. import unittest
  3.  
  4.  
  5. class TestEquality(unittest.TestCase):
  6.  
  7.     def test_equality(self):
  8.         alpha, beta = 1.1, 2.2
  9.         self.assertEqual(alpha, beta)
  10.  
  11.  
  12. if __name__ == '__main__':
  13.     print(sys.version)
  14.     unittest.main()
  15.  
  16. """Output:
  17. 3.11.2 (main, Feb 13 2023, 08:55:54) [GCC 11.3.0]
  18. F
  19. ======================================================================
  20. FAIL: test_equality (__main__.TestEquality.test_equality)
  21. ----------------------------------------------------------------------
  22. Traceback (most recent call last):
  23.  File "test_equal.py", line 9, in test_equality
  24.    self.assertEqual(alpha, beta)
  25. AssertionError: 1.1 != 2.2
  26.  
  27. ----------------------------------------------------------------------
  28. Ran 1 test in 0.000s
  29.  
  30. FAILED (failures=1)
  31. """
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement