Update test coverage
This commit is contained in:
@@ -2184,27 +2184,3 @@ def testGuiEditor_Search(qtbot, monkeypatch, nwGUI, prjLipsum):
|
||||
assert docEditor.textCursor().selectedText() == ""
|
||||
|
||||
# qtbot.stop()
|
||||
|
||||
|
||||
@pytest.mark.gui
|
||||
def testGuiEditor_StaticMethods():
|
||||
"""Test the document editor's static methods."""
|
||||
# Check the method that decides if it is allowed to insert a space
|
||||
# before a colon using the French, Spanish, etc language feature
|
||||
assert GuiDocEditor._allowSpaceBeforeColon("", "") is True
|
||||
assert GuiDocEditor._allowSpaceBeforeColon("", ":") is True
|
||||
assert GuiDocEditor._allowSpaceBeforeColon("some text", ":") is True
|
||||
|
||||
assert GuiDocEditor._allowSpaceBeforeColon("@:", ":") is False
|
||||
assert GuiDocEditor._allowSpaceBeforeColon("@>", ">") is True
|
||||
|
||||
assert GuiDocEditor._allowSpaceBeforeColon("%", ":") is True
|
||||
assert GuiDocEditor._allowSpaceBeforeColon("%:", ":") is True
|
||||
assert GuiDocEditor._allowSpaceBeforeColon("%synopsis:", ":") is False
|
||||
assert GuiDocEditor._allowSpaceBeforeColon("%Synopsis:", ":") is False
|
||||
assert GuiDocEditor._allowSpaceBeforeColon("% synopsis:", ":") is False
|
||||
assert GuiDocEditor._allowSpaceBeforeColon("% Synopsis:", ":") is False
|
||||
assert GuiDocEditor._allowSpaceBeforeColon("% synopsis:", ":") is False
|
||||
assert GuiDocEditor._allowSpaceBeforeColon("% Synopsis:", ":") is False
|
||||
assert GuiDocEditor._allowSpaceBeforeColon("%synopsis :", ":") is True
|
||||
assert GuiDocEditor._allowSpaceBeforeColon("%Synopsis :", ":") is True
|
||||
|
||||
@@ -474,7 +474,7 @@ def testGuiMain_Editing(qtbot, monkeypatch, nwGUI, projPath, tstPaths, mockRnd):
|
||||
# Special Formatting
|
||||
# ==================
|
||||
|
||||
# Insert spaces before colon, but ignore tags and synopsis
|
||||
# Insert spaces before colon, but ignore tags
|
||||
docEditor._typPadBefore = ":"
|
||||
|
||||
for c in "@object: NoSpaceAdded":
|
||||
@@ -482,7 +482,12 @@ def testGuiMain_Editing(qtbot, monkeypatch, nwGUI, projPath, tstPaths, mockRnd):
|
||||
qtbot.keyClick(docEditor, Qt.Key.Key_Return, delay=KEY_DELAY)
|
||||
qtbot.keyClick(docEditor, Qt.Key.Key_Return, delay=KEY_DELAY)
|
||||
|
||||
for c in "% synopsis: No space before this colon.":
|
||||
for c in "% synopsis: Space before this is OK.":
|
||||
qtbot.keyClick(docEditor, c, delay=KEY_DELAY)
|
||||
qtbot.keyClick(docEditor, Qt.Key.Key_Return, delay=KEY_DELAY)
|
||||
qtbot.keyClick(docEditor, Qt.Key.Key_Return, delay=KEY_DELAY)
|
||||
|
||||
for c in "%Footnote.abc: A simple footnote.":
|
||||
qtbot.keyClick(docEditor, c, delay=KEY_DELAY)
|
||||
qtbot.keyClick(docEditor, Qt.Key.Key_Return, delay=KEY_DELAY)
|
||||
qtbot.keyClick(docEditor, Qt.Key.Key_Return, delay=KEY_DELAY)
|
||||
|
||||
Reference in New Issue
Block a user