Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 10a11,47
- > args = (<test_test.MyTest testMethod=test_test>, 1, 2), kwargs = {}
- >
- > def custom_assert_eq(*args, **kwargs):
- > try:
- > > real_fun(*args, **kwargs)
- >
- > test_test.py:10:
- > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- >
- > self = <test_test.MyTest testMethod=test_test>, first = 1, second = 2
- > msg = None
- >
- > def assertEqual(self, first, second, msg=None):
- > """Fail if the two objects are unequal as determined by the '=='
- > operator.
- > """
- > assertion_func = self._getAssertEqualityFunc(first, second)
- > > assertion_func(first, second, msg=msg)
- >
- > /usr/lib64/python3.7/unittest/case.py:839:
- > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- >
- > self = <test_test.MyTest testMethod=test_test>, first = 1, second = 2
- > msg = '1 != 2'
- >
- > def _baseAssertEqual(self, first, second, msg=None):
- > """The default assertEqual implementation, not type specific."""
- > if not first == second:
- > standardMsg = '%s != %s' % _common_shorten_repr(first, second)
- > msg = self._formatMessage(msg, standardMsg)
- > > raise self.failureException(msg)
- > E AssertionError: 1 != 2
- >
- > /usr/lib64/python3.7/unittest/case.py:832: AssertionError
- >
- > During handling of the above exception, another exception occurred:
- >
- 15d51
- < E AssertionError: 1 != 2
- 17c53,59
- < test_test.py:18: AssertionError
- ---
- > test_test.py:18:
- > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- > test_test.py:12: in custom_assert_eq
- > raise MyError().with_traceback(e.__traceback__)
- > test_test.py:10: in custom_assert_eq
- > real_fun(*args, **kwargs)
- > E test_test.MyError
- 19,20c61,62
- < FAILED test_test.py::MyTest::test_test - AssertionError: 1 != 2
- < ============================== 1 failed in 0.04s ===============================
- ---
- > FAILED test_test.py::MyTest::test_test - test_test.MyError
- > ============================== 1 failed in 0.10s ===============================
Advertisement
Add Comment
Please, Sign In to add comment