Skip to content

Commit

Permalink
specify --qt-api to pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky committed Jan 8, 2021
1 parent 5cf0955 commit dca6027
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ssst/_tests/pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def pytest_configure(config: _pytest.config.Config) -> None:
qt_api_string = config.getoption("--qt-api")
qt_api = ssst.cli.qt_api_cli_names[qt_api_string]

if qt_api is not None:
if qt_api is not None: # pragma: no branch
ssst._utilities.configure_qtpy(api=qt_api)

# subprocessing to avoid import of qtpy, even in subprocessed tests
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ extras=
pyqt5: pyqt5
pyside2: pyside2
setenv =
pyqt5: QT_API = pyqt5
pyside2: QT_API = pyside2
pyqt5: SSST_QT_API = pyqt5
pyside2: SSST_QT_API = pyside2
pyqt5: SSST_MYPY_QTPY_ARGUMENTS = --always-false=PYQT4 --always-true=PYQT5 --always-false=PYSIDE --always-false=PYSIDE2
pyside2: SSST_MYPY_QTPY_ARGUMENTS = --always-false=PYQT4 --always-false=PYQT5 --always-false=PYSIDE --always-true=PYSIDE2
QT_DEBUG_PLUGINS = 1
Expand Down Expand Up @@ -44,7 +44,7 @@ setenv =
commands =
{[python_info]commands}
ssst uic
pytest --verbosity=1 --cov=ssst {posargs:--pyargs ssst}
pytest --verbosity=1 --cov=ssst --qt-api={env:SSST_QT_API} {posargs:--pyargs ssst}
coverage xml

[testenv:black]
Expand Down

0 comments on commit dca6027

Please sign in to comment.