Fixed error when desc() returns multiple results

This commit is contained in:
2020-12-04 17:37:06 +01:00
parent 8b86998225
commit d364878ddb
16 changed files with 408 additions and 19 deletions
+13
View File
@@ -1183,6 +1183,19 @@ as:
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")
def test_i_can_display_multiple_concepts_using_desc_command(self):
init = [
"def concept foo as 1",
"def concept foo as 2",
]
sheerka = self.init_scenario(init)
res = sheerka.evaluate_user_input("desc(foo)")
assert len(res) == 1
assert res[0].status
assert sheerka.isinstance(res[0].body, BuiltinConcepts.TO_MULTI)
class TestSheerkaNonRegFile(TestUsingFileBasedSheerka):
def test_i_can_def_several_concepts(self):