Fix tests and clean up a couple of minor things in HTML generator

This commit is contained in:
Veronica K. B. Olsen
2021-01-26 13:12:38 +01:00
parent f21cff335b
commit 94c755a0e6
7 changed files with 45 additions and 49 deletions
+5 -5
View File
@@ -36,10 +36,10 @@ def testCoreToHtml_Format(dummyGUI):
# ===========
assert theHtml._formatSynopsis("synopsis text") == (
"<p class='synopsis'><strong>Synopsis: </strong>synopsis text</p>\n"
"<p class='synopsis'><strong>Synopsis:</strong> synopsis text</p>\n"
)
assert theHtml._formatComments("comment text") == (
"<p class='comment'><strong>Comment: </strong>comment text</p>\n"
"<p class='comment'><strong>Comment:</strong> comment text</p>\n"
)
assert theHtml._formatKeywords("") == ""
@@ -60,7 +60,7 @@ def testCoreToHtml_Format(dummyGUI):
theHtml.setPreview(True, True)
assert theHtml._formatSynopsis("synopsis text") == (
"<p class='comment'><span class='synopsis'>Synopsis: </span>synopsis text</p>\n"
"<p class='comment'><span class='synopsis'>Synopsis:</span> synopsis text</p>\n"
)
assert theHtml._formatComments("comment text") == (
"<p class='comment'>comment text</p>\n"
@@ -172,7 +172,7 @@ def testCoreToHtml_Convert(dummyGUI):
theHtml.tokenizeText()
theHtml.doConvert()
assert theHtml.theResult == (
"<p class='synopsis'><strong>Synopsis: </strong>The synopsis ...</p>\n"
"<p class='synopsis'><strong>Synopsis:</strong> The synopsis ...</p>\n"
)
# Comment
@@ -186,7 +186,7 @@ def testCoreToHtml_Convert(dummyGUI):
theHtml.tokenizeText()
theHtml.doConvert()
assert theHtml.theResult == (
"<p class='comment'><strong>Comment: </strong>A comment ...</p>\n"
"<p class='comment'><strong>Comment:</strong> A comment ...</p>\n"
)
# Keywords