pytest-qt
pytest-qt copied to clipboard
pytest plugin for Qt (PyQt5/PyQt6 and PySide2/PySide6) application testing
- [x] tests. - [ ] CHANGELOG.
When running any pytest I receive the following error ``` INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/test/.venv/lib/python3.9/site-packages/_pytest/main.py", line 264, in wrap_session INTERNALERROR> config._do_configure() INTERNALERROR> File "/test/.venv/lib/python3.9/site-packages/_pytest/config/__init__.py", line 992,...
I've stumbled across an issue this morning with running tests that use QSettings. The qapp fixture does have a default value and a config setting for the application name. Nevertheless,...
Dear The-Compiler (or others). Any chance you might take a look at this SO question I posed a few days ago? Today I discovered `waitSignal`, and it seems to work...
Hello! Had a test fail with 4.0.0 like: ``` @pytest.fixture def spawn_terminal(qtbot, blank_pilot_db): prefs.clear() prefs.set('AGENT', 'TERMINAL') pilot_db_fn = blank_pilot_db prefs.set('PILOT_DB', pilot_db_fn) > app = qt_api.QApplication.instance() E AttributeError: '_QtApi' object has...
Include a Tips chapter to the documentation: - Configure a `QSettings` instance for tests (#85); - Document `qapp` as a public fixture; - Emulate `keyClicks` (https://github.com/pytest-dev/pytest-qt/issues/254#issuecomment-561848689).
In `tests/test_wait_signal.py`, we have: ```python @pytest.mark.filterwarnings("ignore:qt_wait_signal_raising is deprecated") @pytest.mark.parametrize("configkey", ["qt_wait_signal_raising", "qt_default_raising"]) def test_raising_by_default_overridden(qtbot, testdir, configkey): ``` yet running pytest results in: ``` =============================== warnings summary =============================== tests/test_wait_signal.py::test_raising_by_default_overridden[qt_wait_signal_raising] /home/florian/proj/pytest-qt/.tox/py37-pyside6/lib/python3.7/site-packages/pytestqt/plugin.py:226: DeprecationWarning: qt_wait_signal_raising...
I have a test that uses `waitCallback`, which succeeds when run in isolation, but fails if a `QApplication.quit` is run from my code somewhere before. In that case, it fails...
Unfortunately requires access to a Mac to investigate/debug this further. Marked the flaky tests as `xfail`. [logs_98.zip](https://github.com/pytest-dev/pytest-qt/files/5078609/logs_98.zip)
I am using qtbot for a while now with some (