Remove encoding line and add spaces between classes and functions, tests

This commit is contained in:
Veronica Berglyd Olsen
2021-06-25 21:04:48 +02:00
parent edfd7c9770
commit 991a61f2f6
41 changed files with 150 additions and 41 deletions
+13 -1
View File
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
novelWriter Test Suite Configuration
======================================
@@ -34,6 +33,7 @@ import nw # noqa: E402
from nw.config import Config # noqa: E402
##
# Core Test Folders
##
@@ -52,6 +52,7 @@ def tmpDir():
os.mkdir(theDir)
return theDir
@pytest.fixture(scope="session")
def refDir():
"""The folder where all the reference files are stored for verifying
@@ -61,6 +62,7 @@ def refDir():
theDir = os.path.join(testDir, "reference")
return theDir
@pytest.fixture(scope="session")
def filesDir():
"""The folder where additional test files are stored.
@@ -69,6 +71,7 @@ def filesDir():
theDir = os.path.join(testDir, "files")
return theDir
@pytest.fixture(scope="session")
def outDir(tmpDir):
"""An output folder for test results
@@ -78,6 +81,7 @@ def outDir(tmpDir):
os.mkdir(theDir)
return theDir
@pytest.fixture(scope="function")
def fncDir(tmpDir):
"""A temporary folder for a single test function.
@@ -92,6 +96,7 @@ def fncDir(tmpDir):
shutil.rmtree(fncDir)
return
@pytest.fixture(scope="function")
def fncProj(fncDir):
"""A temporary folder for a single test function,
@@ -104,6 +109,7 @@ def fncProj(fncDir):
os.mkdir(prjDir)
return prjDir
##
# novelWriter Objects
##
@@ -121,6 +127,7 @@ def tmpConf(tmpDir):
theConf.guiLang = "en_GB"
return theConf
@pytest.fixture(scope="function")
def fncConf(fncDir):
"""Create a temporary novelWriter configuration object.
@@ -134,6 +141,7 @@ def fncConf(fncDir):
theConf.guiLang = "en_GB"
return theConf
@pytest.fixture(scope="function")
def dummyGUI(monkeypatch, tmpConf):
"""Create a mock instance of novelWriter's main GUI class.
@@ -143,6 +151,7 @@ def dummyGUI(monkeypatch, tmpConf):
theGui.mainConf = tmpConf
return theGui
@pytest.fixture(scope="function")
def nwGUI(qtbot, monkeypatch, fncDir, fncConf):
"""Create an instance of the novelWriter GUI.
@@ -164,6 +173,7 @@ def nwGUI(qtbot, monkeypatch, fncDir, fncConf):
return
##
# Temp Project Folders
##
@@ -188,6 +198,7 @@ def nwMinimal(tmpDir):
return
@pytest.fixture(scope="function")
def nwLipsum(tmpDir):
"""A medium sized novelWriter example project with a lot of Lorem
@@ -209,6 +220,7 @@ def nwLipsum(tmpDir):
return
@pytest.fixture(scope="function")
def nwOldProj(tmpDir):
"""A minimal movelWriter project using the old folder structure used