def test_stype_embed_helper(self): """ Test stype on reraises decorators. """ @reraise(BaleenError) def badfunc(): raise TypeError("This is clearly the wrong type!") try: badfunc() except BaleenError as e: self.assertEqual(stype(e), "BaleenError (TypeError)")
def test_stype_helper(self): """ Test the stype helper function """ self.assertEqual(stype(BaleenError("Bad things!")), BaleenError.__name__)