aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_exception_group.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_exception_group.py')
-rw-r--r--Lib/test/test_exception_group.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_exception_group.py b/Lib/test/test_exception_group.py
index 92bbf791764..242d7ced007 100644
--- a/Lib/test/test_exception_group.py
+++ b/Lib/test/test_exception_group.py
@@ -5,9 +5,9 @@ from test.support import skip_emscripten_stack_overflow, exceeds_recursion_limit
class TestExceptionGroupTypeHierarchy(unittest.TestCase):
def test_exception_group_types(self):
- self.assertTrue(issubclass(ExceptionGroup, Exception))
- self.assertTrue(issubclass(ExceptionGroup, BaseExceptionGroup))
- self.assertTrue(issubclass(BaseExceptionGroup, BaseException))
+ self.assertIsSubclass(ExceptionGroup, Exception)
+ self.assertIsSubclass(ExceptionGroup, BaseExceptionGroup)
+ self.assertIsSubclass(BaseExceptionGroup, BaseException)
def test_exception_is_not_generic_type(self):
with self.assertRaisesRegex(TypeError, 'Exception'):
@@ -812,8 +812,8 @@ class NestedExceptionGroupSplitTest(ExceptionGroupSplitTestBase):
eg = ExceptionGroup("eg", [ValueError(1), TypeError(2)])
eg.__notes__ = 123
match, rest = eg.split(TypeError)
- self.assertFalse(hasattr(match, '__notes__'))
- self.assertFalse(hasattr(rest, '__notes__'))
+ self.assertNotHasAttr(match, '__notes__')
+ self.assertNotHasAttr(rest, '__notes__')
def test_drive_invalid_return_value(self):
class MyEg(ExceptionGroup):