Fix failing test due to config init change
This commit is contained in:
@@ -109,7 +109,7 @@ class Config:
|
|||||||
|
|
||||||
self._appPath = Path(__file__).parent.absolute()
|
self._appPath = Path(__file__).parent.absolute()
|
||||||
self._appRoot = self._appPath.parent
|
self._appRoot = self._appPath.parent
|
||||||
if getattr(sys, "frozen", False):
|
if getattr(sys, "frozen", False): # pragma: no cover
|
||||||
# novelWriter is packaged as an exe
|
# novelWriter is packaged as an exe
|
||||||
self._appPath = Path(__file__).parent.parent.absolute()
|
self._appPath = Path(__file__).parent.parent.absolute()
|
||||||
self._appRoot = self._appPath
|
self._appRoot = self._appPath
|
||||||
|
|||||||
@@ -84,12 +84,6 @@ def testBaseConfig_Constructor(monkeypatch):
|
|||||||
assert tstConf.osWindows is False
|
assert tstConf.osWindows is False
|
||||||
assert tstConf.osUnknown is True
|
assert tstConf.osUnknown is True
|
||||||
|
|
||||||
# App is single file
|
|
||||||
with monkeypatch.context() as mp:
|
|
||||||
mp.setattr("pathlib.Path.is_file", lambda *a: True)
|
|
||||||
tstConf = Config()
|
|
||||||
assert tstConf._appPath == tstConf._appRoot
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.base
|
@pytest.mark.base
|
||||||
def testBaseConfig_InitLoadSave(monkeypatch, fncPath, tstPaths):
|
def testBaseConfig_InitLoadSave(monkeypatch, fncPath, tstPaths):
|
||||||
|
|||||||
Reference in New Issue
Block a user