Resolved some remaining chicken and egg when parsing BNF nodes

This commit is contained in:
2020-07-05 11:03:03 +02:00
parent ad8a997942
commit 71f753c925
14 changed files with 310 additions and 56 deletions
+2 -2
View File
@@ -116,11 +116,11 @@ def test_i_can_search():
assert list(abbb.search(start_with_self=True)) == [abbb, abb, ab, a]
assert list(abbb.search(lambda ec: ec.obj != "skip")) == [ab, a]
assert list(abbb.search(lambda ec: ec.obj != "skip", lambda ec: ec.action_context)) == ["ab", "a"]
assert list(abbb.search(stop=lambda ec: ec.obj == "skip")) == []
assert list(abbb.search(stop=lambda ec: ec.obj == "skip")) == [abb]
assert list(abbb.search(
stop=lambda ec: ec.obj == "skip",
start_with_self=True,
get_obj=lambda ec: ec.obj)) == ["obj_abbb"]
get_obj=lambda ec: ec.obj)) == ["obj_abbb", "skip"]
def test_variables_are_passed_to_children_but_not_to_parents():