diff --git a/.github/workflows/test_linux.yml b/.github/workflows/test_linux.yml index a7228a08..9112966e 100644 --- a/.github/workflows/test_linux.yml +++ b/.github/workflows/test_linux.yml @@ -36,7 +36,7 @@ jobs: - name: Run Tests run: | export QT_QPA_PLATFORM=offscreen - pytest -v --cov=novelwriter --timeout=60 + python -m pytest -v --cov=novelwriter --timeout=60 - name: Upload to Codecov uses: codecov/codecov-action@v4 env: diff --git a/.github/workflows/test_mac.yml b/.github/workflows/test_mac.yml index 64c3dfa8..0d968ab3 100644 --- a/.github/workflows/test_mac.yml +++ b/.github/workflows/test_mac.yml @@ -30,7 +30,7 @@ jobs: - name: Run Tests run: | export QT_QPA_PLATFORM=offscreen - pytest -v --cov=novelwriter --timeout=60 + python -m pytest -v --cov=novelwriter --timeout=60 - name: Upload to Codecov uses: codecov/codecov-action@v4 env: diff --git a/.github/workflows/test_win.yml b/.github/workflows/test_win.yml index 9cb28ba0..afecc017 100644 --- a/.github/workflows/test_win.yml +++ b/.github/workflows/test_win.yml @@ -26,7 +26,7 @@ jobs: pip install -U -r requirements.txt -r tests/requirements.txt - name: Run Tests run: | - pytest -v --cov=novelwriter --timeout=60 + python -m pytest -v --cov=novelwriter --timeout=60 - name: Upload to Codecov uses: codecov/codecov-action@v4 env: diff --git a/tests/conftest.py b/tests/conftest.py index 6b95d569..1e463f9c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -30,13 +30,13 @@ import pytest from PyQt5.QtWidgets import QMessageBox -from tests.mocked import MockGuiMain, MockTheme -from tests.tools import cleanProject - sys.path.insert(1, str(Path(__file__).parent.parent.absolute())) from novelwriter import CONFIG, SHARED, main # noqa: E402 +from tests.mocked import MockGuiMain, MockTheme # noqa: E402 +from tests.tools import cleanProject # noqa: E402 + _TST_ROOT = Path(__file__).parent _TMP_ROOT = _TST_ROOT / "temp" _TMP_CONF = _TMP_ROOT / "conf"