Exemplo n.º 1
0
    def test_exception_hierarchy(self):

        with ignored(LookupError):
            'Hello'[50]
Exemplo n.º 2
0
    def test_exact_exception(self):

        with ignored(TypeError):
            len(5)
Exemplo n.º 3
0
    def test_multiple_exception_args(self):

        with ignored(ZeroDivisionError, TypeError):
            len(5)
Exemplo n.º 4
0
    def test_no_exception(self):

        with ignored(ValueError):
            self.assertEqual(pow(2, 5), 32)
Exemplo n.º 5
0
    def test_exception_hierarchy(self):

        with ignored(LookupError):
            'Hello'[50]
Exemplo n.º 6
0
    def test_multiple_exception_args(self):

        with ignored(ZeroDivisionError, TypeError):
            len(5)
Exemplo n.º 7
0
    def test_exact_exception(self):

        with ignored(TypeError):
            len(5)
Exemplo n.º 8
0
    def test_no_exception(self):

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