Skip to content

Commit dca6027

Browse files
committed
specify --qt-api to pytest
1 parent 5cf0955 commit dca6027

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/ssst/_tests/pytest_plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def pytest_configure(config: _pytest.config.Config) -> None:
2626
qt_api_string = config.getoption("--qt-api")
2727
qt_api = ssst.cli.qt_api_cli_names[qt_api_string]
2828

29-
if qt_api is not None:
29+
if qt_api is not None: # pragma: no branch
3030
ssst._utilities.configure_qtpy(api=qt_api)
3131

3232
# subprocessing to avoid import of qtpy, even in subprocessed tests

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ extras=
1212
pyqt5: pyqt5
1313
pyside2: pyside2
1414
setenv =
15-
pyqt5: QT_API = pyqt5
16-
pyside2: QT_API = pyside2
15+
pyqt5: SSST_QT_API = pyqt5
16+
pyside2: SSST_QT_API = pyside2
1717
pyqt5: SSST_MYPY_QTPY_ARGUMENTS = --always-false=PYQT4 --always-true=PYQT5 --always-false=PYSIDE --always-false=PYSIDE2
1818
pyside2: SSST_MYPY_QTPY_ARGUMENTS = --always-false=PYQT4 --always-false=PYQT5 --always-false=PYSIDE --always-true=PYSIDE2
1919
QT_DEBUG_PLUGINS = 1
@@ -44,7 +44,7 @@ setenv =
4444
commands =
4545
{[python_info]commands}
4646
ssst uic
47-
pytest --verbosity=1 --cov=ssst {posargs:--pyargs ssst}
47+
pytest --verbosity=1 --cov=ssst --qt-api={env:SSST_QT_API} {posargs:--pyargs ssst}
4848
coverage xml
4949

5050
[testenv:black]

0 commit comments

Comments
 (0)