示例#1
0
def test_parser_consume_fail():
    p = Parser(b'data')

    with pytest.raises(ParseError):
        p.consume(rb'invalid')
示例#2
0
def test_parser_consume_success():
    p = Parser(b'data')
    result = p.consume(rb'data')

    assert result
    assert p.index == 4