You must now use 'eval' to get the body of a concept
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
from core.builtin_concepts import BuiltinConcepts
|
||||
from core.concept import Concept
|
||||
from core.sheerka import ExecutionContext
|
||||
from sdp.sheerkaDataProvider import Event
|
||||
|
||||
|
||||
def test_id_is_incremented_by_event_digest():
|
||||
a = ExecutionContext("foo", "event_1", None)
|
||||
b = ExecutionContext("foo", "event_1", None)
|
||||
c = ExecutionContext("foo", "event_2", None)
|
||||
a = ExecutionContext("foo", Event("event_1"), None)
|
||||
b = ExecutionContext("foo", Event("event_1"), None)
|
||||
c = ExecutionContext("foo", Event("event_2"), None)
|
||||
d = b.push()
|
||||
e = c.push()
|
||||
|
||||
@@ -18,17 +19,19 @@ def test_id_is_incremented_by_event_digest():
|
||||
|
||||
|
||||
def test_some_properties_are_given_to_the_child():
|
||||
a = ExecutionContext("foo", "event_1", "fake_sheerka",
|
||||
a = ExecutionContext("foo", Event("event_1"), "fake_sheerka",
|
||||
desc="some description",
|
||||
obj=Concept("foo"),
|
||||
step=BuiltinConcepts.EVALUATION,
|
||||
iteration=15,
|
||||
concepts={"bar": Concept("bar")})
|
||||
a.preprocess = set()
|
||||
a.preprocess.add("preprocess")
|
||||
|
||||
b = a.push()
|
||||
|
||||
assert b.who == a.who
|
||||
assert b.event_digest == a.event_digest
|
||||
assert b.event == a.event
|
||||
assert b.sheerka == a.sheerka
|
||||
assert b.desc == ""
|
||||
assert b.obj == a.obj
|
||||
@@ -37,3 +40,4 @@ def test_some_properties_are_given_to_the_child():
|
||||
assert b.concepts == a.concepts
|
||||
assert b.id == a.id + 1
|
||||
assert b._tab == a._tab + " "
|
||||
assert b.preprocess == a.preprocess
|
||||
|
||||
Reference in New Issue
Block a user