Example #1
0
def test_scan_incomplete():
    with pytest.raises(ValueError):
        scan([dollar], '$1')
Example #2
0
def test_scan():
    assert scan([dollar], '$') == [Node(dollar, '$')]
    assert scan([dollar, number], '$123') == [
        Node(dollar, '$'),
        Node(number, '123'),
        ]