Update tests readme

This commit is contained in:
Veronica K. B. Olsen
2021-04-23 21:54:03 +02:00
parent b698ccbc1d
commit e222915a37
2 changed files with 5 additions and 40 deletions
+3 -38
View File
@@ -52,45 +52,10 @@ pytest-3 -v -m core
Available markers are:
* `base` for unit tests covering the non-gui classes of the `bw` folder..
* `base` for unit tests covering the non-gui classes of the `nw` folder..
* `core` for unit tests covering the classes in the `nw/core` folder.
* `gui` for unit and integrations tests covering the classes in the `nw/gui` folder.
## Tests
To filter specific groups of tests, use the `-k` switch.
The commands for the respective test categories are listed below.
| Type | Test Target | Source File(s) | Marker | Filter |
| :---------- | :----------------------- | :--------------------- | :-------- | :----------------------- |
| Unit | Main function | nw/\_\_init\_\_.py | `-m base` | `-k testBaseInit` |
| Unit | Common functions | nw/common.py | `-m base` | `-k testBaseCommon` |
| Unit | Config class | nw/config.py | `-m base` | `-k testBaseConfig` |
| Unit | Error handlers | nw/error.py | `-m base` | `-k testBaseError` |
| Unit | Core functions | nw/core/tools.py | `-m core` | `-k testCoreTools` |
| Unit | NWDoc class | nw/core/document.py | `-m core` | `-k testCoreDocument` |
| Unit | NWIndex class | nw/core/index.py | `-m core` | `-k testCoreIndex` |
| Unit | NWItem class | nw/core/item.py | `-m core` | `-k testCoreItem` |
| Unit | NWProject class | nw/core/project.py | `-m core` | `-k testCoreProject` |
| Unit | NWSpell* classes | nw/core/spellcheck.py | `-m core` | `-k testCoreSpell` |
| Unit | NWStatus class | nw/core/status.py | `-m core` | `-k testCoreStatus` |
| Unit | NWTree class | nw/core/tree.py | `-m core` | `-k testCoreTree` |
| Unit | OptionsState class | nw/core/options.py | `-m core` | `-k testCoreOptions` |
| Unit | ToHtml class | nw/core/tohtml.py | `-m core` | `-k testCoreToHtml` |
| Unit | Tokenizer class | nw/core/tokenizer.py | `-m core` | `-k testCoreToken` |
| Integration | About Dialogs | nw/gui/about.py | `-m gui` | `-k testGuiAbout` |
| Integration | Build Novel Project Tool | nw/gui/build.py | `-m gui` | `-k testGuiBuild` |
| Integration | Document Editor Widget | nw/gui/doceditor.py | `-m gui` | `-k testGuiEditor` |
| Integration | Document Viewer Widget | nw/gui/docviewer.py | `-m gui` | `-k testGuiViewer` |
| Integration | Item Editor Dialog | nw/gui/itemeditor.py | `-m gui` | `-k testGuiItemEditor` |
| Integration | Menu Widgets | nw/gui/mainmenu.py | `-m gui` | `-k testGuiMenu` |
| Integration | Merge Tool | nw/gui/docmerge.py | `-m gui` | `-k testGuiMergeSplit` |
| Integration | Outline Widget | nw/gui/outline.py | `-m gui` | `-k testGuiOutline` |
| Integration | Preferences Dialog | nw/gui/preferences.py | `-m gui` | `-k testGuiPreferences` |
| Integration | Project Load Dialog | nw/gui/projload.py | `-m gui` | `-k testGuiProjLoad` |
| Integration | Project Settings Dialog | nw/gui/projsettings.py | `-m gui` | `-k testGuiProjSettings` |
| Integration | Project Tree Widget | nw/gui/projtree.py | `-m gui` | `-k testGuiProjTree` |
| Integration | Theme/Icon Classes | nw/gui/theme.py | `-m gui` | `-k testGuiTheme` |
| Integration | Split Tool | nw/gui/docsplit.py | `-m gui` | `-k testGuiMergeSplit` |
| Integration | Writing Stats Dialog | nw/gui/writingstats.py | `-m gui` | `-k testGuiWritingStats` |
| Integration | Various Dialogs | N/A | `-m gui` | `-k testGuiDialogs` |
You can filter tests further with the `-k` switch, all the way down to a single test. You can for
instance run only dialog tests with `-k testDlg` or tools with `-k testTool`.
+2 -2
View File
@@ -32,7 +32,7 @@ typeDelay = 1
stepDelay = 20
@pytest.mark.gui
def testDialogs_QuoteSelect(qtbot, monkeypatch, nwGUI, nwMinimal):
def testDlgOther_QuoteSelect(qtbot, monkeypatch, nwGUI, nwMinimal):
"""Test the quote symbols dialog.
"""
# Block message box
@@ -58,4 +58,4 @@ def testDialogs_QuoteSelect(qtbot, monkeypatch, nwGUI, nwMinimal):
nwQuot._doReject()
nwQuot.close()
# END Test testDialogs_QuoteSelect
# END Test testDlgOther_QuoteSelect