Exemple #1
0
def test_rewind_to_parent():
    cursor = SampleCursor("""
        <root><a><target><cursor/></target></a></root>
    """)
    assert cursor.rewind().node.tag == "target"
Exemple #2
0
def test_rewind_to_previous():
    cursor = SampleCursor("""
        <root><a/><target/><cursor/><d/></root>
    """)
    assert cursor.rewind().node.tag == "target"