Added keyword c:xxx: to express that we want the concept, not its body
This commit is contained in:
@@ -55,3 +55,15 @@ def test_i_can_detect_error():
|
||||
assert isinstance(res.value, ParserResultConcept)
|
||||
assert isinstance(res.value.value[0], PythonErrorNode)
|
||||
assert isinstance(res.value.value[0].exception, SyntaxError)
|
||||
|
||||
|
||||
def test_i_can_parse_a_concept():
|
||||
text = "c:concept_name: + 1"
|
||||
|
||||
parser = PythonParser()
|
||||
res = parser.parse(get_context(), text)
|
||||
|
||||
assert res
|
||||
assert res.value.value == PythonNode(
|
||||
"c:concept_name: + 1",
|
||||
ast.parse("__C__concept_name__C__+1", mode="eval"))
|
||||
|
||||
Reference in New Issue
Block a user