示例#1
0
    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)")
示例#2
0
    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)")
示例#3
0
 def test_stype_helper(self):
     """
     Test the stype helper function
     """
     self.assertEqual(stype(BaleenError("Bad things!")), BaleenError.__name__)