def test_exception_hierarchy(self): with ignored(LookupError): 'Hello'[50]
def test_exact_exception(self): with ignored(TypeError): len(5)
def test_multiple_exception_args(self): with ignored(ZeroDivisionError, TypeError): len(5)
def test_no_exception(self): with ignored(ValueError): self.assertEqual(pow(2, 5), 32)