diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c241bbbd..363c3f9f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,9 @@ +3.0.3 (unreleased) +------------------ + +- Improve debugging output when no Qt wrapper was found. +- Register the ``no_qt_log`` marker with pytest so ``--strict`` can be used. + 3.0.2 (2018-08-31) ------------------ diff --git a/pytestqt/plugin.py b/pytestqt/plugin.py index d47209f6..65fb0320 100644 --- a/pytestqt/plugin.py +++ b/pytestqt/plugin.py @@ -204,6 +204,7 @@ def pytest_configure(config): config.addinivalue_line( "markers", "qt_log_ignore: overrides qt_log_ignore ini option." ) + config.addinivalue_line("markers", "no_qt_log: Turn off Qt logging capture.") if config.getoption("qt_log"): config.pluginmanager.register(QtLoggingPlugin(config), "_qt_logging") diff --git a/setup.cfg b/setup.cfg index 2a9acf13..2f680978 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,7 @@ [bdist_wheel] universal = 1 + +[tool:pytest] +testpaths = tests +addopts = --strict +xfail_strict = true diff --git a/tests/test_qtest_proxies.py b/tests/test_qtest_proxies.py index e93e4917..58ee6ba7 100644 --- a/tests/test_qtest_proxies.py +++ b/tests/test_qtest_proxies.py @@ -18,7 +18,7 @@ "keyEvent", "keyPress", "keyRelease", - fails_on_pyqt("keyToAscii"), + pytest.param("keyToAscii", marks=fails_on_pyqt), "mouseClick", "mouseDClick", "mouseMove", diff --git a/tox.ini b/tox.ini index d945bba1..7383fe6e 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,7 @@ deps= pyside2: pyside2 pyqt5: pyqt5 commands= - pytest tests + pytest {posargs} setenv= pyside2: PYTEST_QT_API=pyside2 pyqt5: PYTEST_QT_API=pyqt5