Skip to content

Commit

Permalink
Fix failing test due to config init change
Browse files Browse the repository at this point in the history
  • Loading branch information
vkbo committed Jan 16, 2025
1 parent 0380a7f commit 9c04899
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion novelwriter/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def __init__(self) -> None:

self._appPath = Path(__file__).parent.absolute()
self._appRoot = self._appPath.parent
if getattr(sys, "frozen", False):
if getattr(sys, "frozen", False): # pragma: no cover
# novelWriter is packaged as an exe
self._appPath = Path(__file__).parent.parent.absolute()
self._appRoot = self._appPath
Expand Down
6 changes: 0 additions & 6 deletions tests/test_base/test_base_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,6 @@ def testBaseConfig_Constructor(monkeypatch):
assert tstConf.osWindows is False
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
def testBaseConfig_InitLoadSave(monkeypatch, fncPath, tstPaths):
Expand Down

0 comments on commit 9c04899

Please sign in to comment.