def METHOD_NAME(self):
    try:
        compile_isolated(bar, (types.int32,))
    except TypingError as e:
        self.assertIn("Unknown attribute 'a' of type int32", str(e))
    else:
        self.fail("Should raise error")