Use python -m to run pytest

This commit is contained in:
Veronica Berglyd Olsen
2024-05-10 16:36:14 +02:00
parent 101400bea3
commit 161d02cd98
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -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:
+3 -3
View File
@@ -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"