Exemplo n.º 1
0
def test_replace():
    chunks = chunkgraph.chunks_from_strings('a', 'b')
    assert len(chunks) == 1
    assert chunks[0].root.kind == 'choice'
    assert chunks[0].root.data == ['a', 'b']
Exemplo n.º 2
0
def test_equals():
    chunks = chunkgraph.chunks_from_strings('a', 'a')
    assert len(chunks) == 1
    assert chunks[0].root.kind == 'concat'
    assert chunks[0].root.data == 'a'
Exemplo n.º 3
0
def test_delete():
    chunks = chunkgraph.chunks_from_strings('a', '')
    assert len(chunks) == 1
    assert chunks[0].root.kind == 'concat_opt'
    assert chunks[0].root.data == 'a'