Refactored Caching, Refactored BnfNodeParser, Introduced Sphinx

This commit is contained in:
2020-05-12 17:21:10 +02:00
parent 7d3a490bc5
commit 6e343ba996
110 changed files with 13865 additions and 7540 deletions
+7 -7
View File
@@ -50,9 +50,9 @@ class TestPythonParser(TestUsingMemoryBasedSheerka):
assert res.who == parser.name
assert isinstance(res.value, NotForMeConcept)
assert res.value.body == text
assert len(res.value.get_prop("reason")) == 1
assert isinstance(res.value.get_prop("reason")[0], PythonErrorNode)
assert isinstance(res.value.get_prop("reason")[0].exception, SyntaxError)
assert len(res.value.get_value("reason")) == 1
assert isinstance(res.value.get_value("reason")[0], PythonErrorNode)
assert isinstance(res.value.get_value("reason")[0].exception, SyntaxError)
@pytest.mark.parametrize("text, error_msg, error_text", [
("c::", "Concept identifiers not found", ""),
@@ -66,10 +66,10 @@ class TestPythonParser(TestUsingMemoryBasedSheerka):
assert isinstance(res.value, NotForMeConcept)
assert res.value.body == text
assert len(res.value.get_prop("reason")) == 1
assert isinstance(res.value.get_prop("reason")[0], LexerError)
assert res.value.get_prop("reason")[0].message == error_msg
assert res.value.get_prop("reason")[0].text == error_text
assert len(res.value.get_value("reason")) == 1
assert isinstance(res.value.get_value("reason")[0], LexerError)
assert res.value.get_value("reason")[0].message == error_msg
assert res.value.get_value("reason")[0].text == error_text
def test_i_can_parse_a_concept(self):
text = "c:name|key: + 1"