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