Updated non reg test when setting attribute
This commit is contained in:
@@ -1166,18 +1166,23 @@ as:
|
||||
def test_i_can_set_attribute(self):
|
||||
init = [
|
||||
"def concept size",
|
||||
"def concept adjective",
|
||||
"def concept beautiful",
|
||||
"def concept little",
|
||||
"def concept house",
|
||||
"def concept little x as set_attr(x, size, little) ret x",
|
||||
"def concept beautiful x as set_attr(x, adjective, beautiful) ret x",
|
||||
]
|
||||
sheerka = self.init_scenario(init)
|
||||
|
||||
res = sheerka.evaluate_user_input("eval little house")
|
||||
res = sheerka.evaluate_user_input("eval beautiful little house")
|
||||
|
||||
assert len(res) == 1
|
||||
assert res[0].status
|
||||
assert sheerka.isinstance(res[0].body, "house")
|
||||
assert sheerka.get_attr(res[0].body, sheerka.new("size")) == sheerka.new("little")
|
||||
assert sheerka.get_attr(res[0].body, sheerka.new("adjective")) == sheerka.new("beautiful")
|
||||
|
||||
|
||||
class TestSheerkaNonRegFile(TestUsingFileBasedSheerka):
|
||||
def test_i_can_def_several_concepts(self):
|
||||
|
||||
Reference in New Issue
Block a user