Extend tests

This commit is contained in:
Veronica Berglyd Olsen
2025-10-22 23:12:11 +02:00
parent 20e1126a62
commit 10f0f6440b
+5 -1
View File
@@ -251,13 +251,17 @@ def testCoreIndexData_IndexHeading():
"note.consitency": "Only explode once", "note.consitency": "Only explode once",
} }
# Append Synopsis
head.setComment(nwComment.SYNOPSIS.name, "", "How it started ...")
assert head.synopsis == "In the beginning ...\n\nHow it started ..."
# Unpack KeyError # Unpack KeyError
with pytest.raises(KeyError, match="Unknown key in heading entry"): with pytest.raises(KeyError, match="Unknown key in heading entry"):
head.unpackData({"stuff": "more stuff"}) head.unpackData({"stuff": "more stuff"})
# Unpack Comments # Unpack Comments
head.unpackData({"summary": "How it started ..."}) head.unpackData({"summary": "How it started ..."})
assert head.synopsis == "How it started ..." assert head.synopsis == "How it started ..." # This resets the comments dictionary
@pytest.mark.core @pytest.mark.core