Fixed some bugs

This commit is contained in:
2020-08-27 18:54:28 +02:00
parent 351c16f946
commit 37cd3ed757
27 changed files with 685 additions and 189 deletions
+33
View File
@@ -1091,6 +1091,39 @@ as:
assert res[0].status
assert res[0].body
def test_i_can_evaluate_source_code_with_concept(self):
init = [
"def concept the a ret a",
]
sheerka = self.init_scenario(init)
res = sheerka.evaluate_user_input("desc(the a)")
assert len(res) == 1
assert res[0].status
def test_i_can_parse_concept_with_variables_using_short_name(self):
init = [
"def concept foo from a foo b where a,b",
"def concept bar from bar a where a",
"def concept baz from a baz where a",
]
sheerka = self.init_scenario(init)
res = sheerka.evaluate_user_input("desc(foo)")
assert len(res) == 1
assert res[0].status
sheerka = self.init_scenario(init)
res = sheerka.evaluate_user_input("desc(bar)")
assert len(res) == 1
assert res[0].status
sheerka = self.init_scenario(init)
res = sheerka.evaluate_user_input("desc(baz)")
assert len(res) == 1
assert res[0].status
class TestSheerkaNonRegFile(TestUsingFileBasedSheerka):
def test_i_can_def_several_concepts(self):