MCPcopy Index your code
hub / github.com/python/cpython / test_comparison_basic

Method test_comparison_basic

Lib/test/test_traceback.py:3742–3752  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3740 self.assertEqual(sys.getrefcount(exc_obj.__traceback__), refcnt2)
3741
3742 def test_comparison_basic(self):
3743 try:
3744 1/0
3745 except Exception as e:
3746 exc_obj = e
3747 exc = traceback.TracebackException.from_exception(exc_obj)
3748 exc2 = traceback.TracebackException.from_exception(exc_obj)
3749 self.assertIsNot(exc, exc2)
3750 self.assertEqual(exc, exc2)
3751 self.assertNotEqual(exc, object())
3752 self.assertEqual(exc, ALWAYS_EQ)
3753
3754 def test_comparison_params_variations(self):
3755 def raise_exc():

Callers

nothing calls this directly

Calls 4

from_exceptionMethod · 0.80
assertIsNotMethod · 0.80
assertNotEqualMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected