예제 #1
0
    def test_exception(self):
        matcher = FullFirstMatch(Any('a'))
        matcher.config.clear()
        try:
            list(matcher.match('b'))
            assert False, 'expected error'
        except FullFirstMatchException as e:
            assert str(e) == """The match failed at 'b',
Line 1, character 0 of str: 'b'.""", str(e)
예제 #2
0
    def test_exception(self):
        matcher = FullFirstMatch(Any('a'))
        matcher.config.clear()
        try:
            list(matcher.match('b'))
            assert False, 'expected error'
        except FullFirstMatchException as e:
            assert str(e) == """The match failed at 'b',
Line 1, character 0 of str: 'b'.""", str(e)