Guest User

Untitled

a guest
Dec 17th, 2020
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. 10a11,47
  2. > args = (<test_test.MyTest testMethod=test_test>, 1, 2), kwargs = {}
  3. >
  4. > def custom_assert_eq(*args, **kwargs):
  5. > try:
  6. > > real_fun(*args, **kwargs)
  7. >
  8. > test_test.py:10:
  9. > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  10. >
  11. > self = <test_test.MyTest testMethod=test_test>, first = 1, second = 2
  12. > msg = None
  13. >
  14. > def assertEqual(self, first, second, msg=None):
  15. > """Fail if the two objects are unequal as determined by the '=='
  16. > operator.
  17. > """
  18. > assertion_func = self._getAssertEqualityFunc(first, second)
  19. > > assertion_func(first, second, msg=msg)
  20. >
  21. > /usr/lib64/python3.7/unittest/case.py:839:
  22. > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  23. >
  24. > self = <test_test.MyTest testMethod=test_test>, first = 1, second = 2
  25. > msg = '1 != 2'
  26. >
  27. > def _baseAssertEqual(self, first, second, msg=None):
  28. > """The default assertEqual implementation, not type specific."""
  29. > if not first == second:
  30. > standardMsg = '%s != %s' % _common_shorten_repr(first, second)
  31. > msg = self._formatMessage(msg, standardMsg)
  32. > > raise self.failureException(msg)
  33. > E AssertionError: 1 != 2
  34. >
  35. > /usr/lib64/python3.7/unittest/case.py:832: AssertionError
  36. >
  37. > During handling of the above exception, another exception occurred:
  38. >
  39. 15d51
  40. < E AssertionError: 1 != 2
  41. 17c53,59
  42. < test_test.py:18: AssertionError
  43. ---
  44. > test_test.py:18:
  45. > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  46. > test_test.py:12: in custom_assert_eq
  47. > raise MyError().with_traceback(e.__traceback__)
  48. > test_test.py:10: in custom_assert_eq
  49. > real_fun(*args, **kwargs)
  50. > E test_test.MyError
  51. 19,20c61,62
  52. < FAILED test_test.py::MyTest::test_test - AssertionError: 1 != 2
  53. < ============================== 1 failed in 0.04s ===============================
  54. ---
  55. > FAILED test_test.py::MyTest::test_test - test_test.MyError
  56. > ============================== 1 failed in 0.10s ===============================
Advertisement
Add Comment
Please, Sign In to add comment