Esempio n. 1
0
def test_lexer_sample():
    for example in examples():
        lxr = lexer()
        with open(example) as exf:
            lxr.input(exf.read())
        for token in lxr:
            print token
Esempio n. 2
0
def test_lexer_new_game():
    lxr = lexer()
    
    lxr.input("""[Board "1"]\n  \t  \v  \r\n[Board "2"]""")
    assert 'NEWGAME' in [token.type for token in lxr]