Fixed parsing of BNF concepts mixed with isaset concepts
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user