Fixed parsing of BNF concepts mixed with isaset concepts

This commit is contained in:
2020-07-02 16:32:02 +02:00
parent 2c5840752a
commit f26c391d3f
12 changed files with 413 additions and 123 deletions
+17
View File
@@ -121,3 +121,20 @@ def test_i_can_search():
stop=lambda ec: ec.obj == "skip",
start_with_self=True,
get_obj=lambda ec: ec.obj)) == ["obj_abbb"]
def test_variables_are_passed_to_children_but_not_to_parents():
a = ExecutionContext("foo", Event("event_1"), "fake_sheerka", BuiltinConcepts.NOP, None)
assert not hasattr(a, "var")
b = a.push(BuiltinConcepts.NOP, None, var="foo")
assert b.var == "foo"
assert not hasattr(a, "var")
c = b.push(BuiltinConcepts.NOP, None)
assert c.var == "foo"
c.var = "bar"
assert c.var == "bar"
assert b.var != "bar"
assert not hasattr(a, "var")