Fixed minor issues and enhancements

This commit is contained in:
2020-05-15 17:01:26 +02:00
parent b54882f994
commit 56e0a9d338
8 changed files with 59 additions and 13 deletions
+14
View File
@@ -193,6 +193,20 @@ class TestAtomsParser(TestUsingMemoryBasedSheerka):
assert sheerka.isinstance(wrapper, BuiltinConcepts.PARSER_RESULT)
assert lexer_nodes == expected_array
def test_i_can_parse_concepts_with_isa(self):
concepts_map = {
"one": Concept("one"),
"number": Concept("number"),
}
sheerka, context, parser = self.init_parser(concepts_map)
sheerka.set_isa(context, sheerka.new("one"), sheerka.new("number"))
res = parser.parse(context, "one")
lexer_nodes = res.body.body
expected_array = compute_expected_array(concepts_map, "one", ["one"])
assert lexer_nodes == expected_array
@pytest.mark.parametrize("text", [
"foo",
f"foo one",