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
+5 -3
View File
@@ -129,12 +129,14 @@ class TestExactConceptParser(TestUsingMemoryBasedSheerka):
def test_i_can_detect_concepts_too_long(self):
context = self.get_context(self.get_sheerka(singleton=True))
source = "a very very long concept"
source = "a very but finally too long concept"
res = ExactConceptParser().parse(context, source)
assert not res.status
assert context.sheerka.isinstance(res.value, BuiltinConcepts.CONCEPT_TOO_LONG)
assert res.value.body == "a very very long concept"
assert context.sheerka.isinstance(res.value, BuiltinConcepts.NOT_FOR_ME)
assert context.sheerka.isinstance(res.value.reason, BuiltinConcepts.CONCEPT_TOO_LONG)
assert res.value.reason.body == source
assert res.value.body == source
def test_i_can_detect_concept_from_tokens(self):
context = self.get_context(self.get_sheerka(singleton=True))