Implemented ConceptManager with concept creation, modification and deletion
This commit is contained in:
@@ -503,6 +503,15 @@ from give me the date !
|
||||
assert context.sheerka.isinstance(res.value, BuiltinConcepts.UNKNOWN_CONCEPT)
|
||||
assert res.value.body == ("key", "unknown")
|
||||
|
||||
def test_i_cannot_parse_bnf_definition_referencing_multiple_concepts_sharing_the_same_name(self):
|
||||
text = "def concept twenty one from bnf 'twenty' one"
|
||||
sheerka, context, parser, *concepts = self.init_parser(Concept("one", body="1"), Concept("one", body="1.0"))
|
||||
res = parser.parse(context, ParserInput(text))
|
||||
|
||||
assert not res.status
|
||||
assert context.sheerka.isinstance(res.value, BuiltinConcepts.CANNOT_RESOLVE_CONCEPT)
|
||||
assert res.value.body == ("key", "one")
|
||||
|
||||
@pytest.mark.parametrize("text", [
|
||||
'def concept "def concept x"',
|
||||
'def concept "def concept x" as x',
|
||||
|
||||
Reference in New Issue
Block a user