'A context manager that asserts the enclosed code block fails
compiling in nopython mode.'

@contextlib.contextmanager
def assertTypingError(self):

    _accepted_errors = (errors.LoweringError, errors.TypingError, TypeError, NotImplementedError)
    with self.assertRaises(_accepted_errors) as cm:
        (yield cm)
