import unittest class CustomTestCase(unittest.TestCase): failureException = AssertionErrorCustom
import unittest class PytestTestCase(unittest.TestCase): failureException = AssertionErrorPytestIn this case, any assertions that fail within a test method of `PytestTestCase` will raise `AssertionErrorPytest`. The `failureException` attribute is part of the `unittest` package library in Python.