@contextlib.contextmanager
    def assertTypingError(self):
        _accepted_errors = (errors.LoweringError, errors.TypingError,
                            TypeError, NotImplementedError)
        with self.assertRaises(_accepted_errors) as cm:
            yield cm
A context manager that asserts the enclosed code block fails
dataset/ETHPy150Open numba/numba/numba/tests/support.py/TestCase.assertTypingError