Use python -m to run pytest
This commit is contained in:
@@ -36,7 +36,7 @@ jobs:
|
|||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: |
|
run: |
|
||||||
export QT_QPA_PLATFORM=offscreen
|
export QT_QPA_PLATFORM=offscreen
|
||||||
pytest -v --cov=novelwriter --timeout=60
|
python -m pytest -v --cov=novelwriter --timeout=60
|
||||||
- name: Upload to Codecov
|
- name: Upload to Codecov
|
||||||
uses: codecov/codecov-action@v4
|
uses: codecov/codecov-action@v4
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ jobs:
|
|||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: |
|
run: |
|
||||||
export QT_QPA_PLATFORM=offscreen
|
export QT_QPA_PLATFORM=offscreen
|
||||||
pytest -v --cov=novelwriter --timeout=60
|
python -m pytest -v --cov=novelwriter --timeout=60
|
||||||
- name: Upload to Codecov
|
- name: Upload to Codecov
|
||||||
uses: codecov/codecov-action@v4
|
uses: codecov/codecov-action@v4
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
pip install -U -r requirements.txt -r tests/requirements.txt
|
pip install -U -r requirements.txt -r tests/requirements.txt
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: |
|
run: |
|
||||||
pytest -v --cov=novelwriter --timeout=60
|
python -m pytest -v --cov=novelwriter --timeout=60
|
||||||
- name: Upload to Codecov
|
- name: Upload to Codecov
|
||||||
uses: codecov/codecov-action@v4
|
uses: codecov/codecov-action@v4
|
||||||
env:
|
env:
|
||||||
|
|||||||
+3
-3
@@ -30,13 +30,13 @@ import pytest
|
|||||||
|
|
||||||
from PyQt5.QtWidgets import QMessageBox
|
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()))
|
sys.path.insert(1, str(Path(__file__).parent.parent.absolute()))
|
||||||
|
|
||||||
from novelwriter import CONFIG, SHARED, main # noqa: E402
|
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
|
_TST_ROOT = Path(__file__).parent
|
||||||
_TMP_ROOT = _TST_ROOT / "temp"
|
_TMP_ROOT = _TST_ROOT / "temp"
|
||||||
_TMP_CONF = _TMP_ROOT / "conf"
|
_TMP_CONF = _TMP_ROOT / "conf"
|
||||||
|
|||||||
Reference in New Issue
Block a user