Example #1
0
    def test_exception_hierarchy(self):

        with ignored(LookupError):
            'Hello'[50]
Example #2
0
    def test_exact_exception(self):

        with ignored(TypeError):
            len(5)
Example #3
0
    def test_multiple_exception_args(self):

        with ignored(ZeroDivisionError, TypeError):
            len(5)
Example #4
0
    def test_no_exception(self):

        with ignored(ValueError):
            self.assertEqual(pow(2, 5), 32)
Example #5
0
    def test_exception_hierarchy(self):

        with ignored(LookupError):
            'Hello'[50]
Example #6
0
    def test_multiple_exception_args(self):

        with ignored(ZeroDivisionError, TypeError):
            len(5)
Example #7
0
    def test_exact_exception(self):

        with ignored(TypeError):
            len(5)
Example #8
0
    def test_no_exception(self):

        with ignored(ValueError):
            self.assertEqual(pow(2, 5), 32)