Spell check comments and docstrings

This commit is contained in:
Veronica Berglyd Olsen
2023-07-20 23:25:49 +02:00
parent e773884c29
commit 4dfa51855e
45 changed files with 122 additions and 175 deletions
+3 -5
View File
@@ -32,8 +32,7 @@ from novelwriter.dialogs.about import GuiAbout
@pytest.mark.gui
def testDlgAbout_NWDialog(qtbot, monkeypatch, nwGUI):
"""Test the novelWriter about dialogs.
"""
"""Test the novelWriter about dialogs."""
# NW About
nwGUI.mainTheme.themeName = "A Theme"
nwGUI.mainTheme.themeAuthor = "An Author"
@@ -72,12 +71,11 @@ def testDlgAbout_NWDialog(qtbot, monkeypatch, nwGUI):
@pytest.mark.gui
def testDlgAbout_QtDialog(monkeypatch, nwGUI):
"""Test the Qt about dialogs.
"""
"""Test the Qt about dialogs."""
monkeypatch.setattr(QMessageBox, "aboutQt", lambda *a, **k: None)
# Open About
# All it can do is check aigainst a crash
# All it can do is check against a crash
assert nwGUI.showAboutQtDialog() is True
nwGUI.mainMenu.aAboutQt.activate(QAction.Trigger)
+3 -6
View File
@@ -31,8 +31,7 @@ from novelwriter.dialogs.editlabel import GuiEditLabel
@pytest.mark.gui
def testDlgOther_QuoteSelect(qtbot, nwGUI):
"""Test the quote symbols dialog.
"""
"""Test the quote symbols dialog."""
nwQuot = GuiQuoteSelect(nwGUI)
nwQuot.show()
@@ -58,8 +57,7 @@ def testDlgOther_QuoteSelect(qtbot, nwGUI):
@pytest.mark.gui
def testDlgOther_Updates(qtbot, monkeypatch, nwGUI):
"""Test the check for updates dialog.
"""
"""Test the check for updates dialog."""
nwUpdate = GuiUpdates(nwGUI)
nwUpdate.show()
@@ -97,8 +95,7 @@ def testDlgOther_Updates(qtbot, monkeypatch, nwGUI):
@pytest.mark.gui
def testDlgOther_EditLabel(qtbot, monkeypatch):
"""Test the label editor dialog.
"""
"""Test the label editor dialog."""
monkeypatch.setattr(GuiEditLabel, "exec_", lambda *a: None)
with monkeypatch.context() as mp:
+2 -3
View File
@@ -29,8 +29,7 @@ from novelwriter.dialogs.editlabel import GuiEditLabel
@pytest.mark.gui
def testDlgSplit_Main(qtbot, monkeypatch, nwGUI, projPath, mockRnd):
"""Test the split document tool.
"""
"""Test the split document tool."""
monkeypatch.setattr(GuiEditLabel, "getLabel", lambda *a, text: (text, True))
# Create a new project
@@ -64,7 +63,7 @@ def testDlgSplit_Main(qtbot, monkeypatch, nwGUI, projPath, mockRnd):
nwSplit.show()
qtbot.addWidget(nwSplit)
# By default, only up to level three headinsg should be listed
# By default, only up to level three headings should be listed
assert nwSplit.splitLevel.currentData() == 3
assert nwSplit.listBox.count() == 11