pytest-qt
pytest-qt copied to clipboard
pytest plugin for Qt (PyQt5/PyQt6 and PySide2/PySide6) application testing
A quick suggestion for the docs. I'm new to Python for Qt and wasn't sure whether pytest-qt or Qt Test was best for starting out my tests or how the...
The [`test_wait_signal.py::test_destroyed`](https://github.com/pytest-dev/pytest-qt/blob/master/tests/test_wait_signal.py#L291) is currently skipped on PySide, with the mention, > For some reason, this crashes PySide although it seems perfectly fine code. There was an attempt to fix it...
Forwarded from [Debian-Bug#872992](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=872992). The TL;DR is that testing with Qt 5.9 fails because of a change in the logging. The reporter solved this by exporting `QT_LOGGING_RULES="default.debug=true"` prior to running the...
I recently updated to pytest 2.8 and noticed I got output which should be captured on stdout. This is during tests which launch a subprocess via `QProcess` which then does...
`bug.py`: ```python from PySide6.QtWidgets import QApplication, QMainWindow from __feature__ import snake_case # isort: skip class MyWindow(QMainWindow): def __init__(self): QApplication.instance().process_events() if __name__ == "__main__": application = QApplication() MyWindow() ``` `python bug.py`...
``` ========================================================================================== FAILURES ========================================================================================== _________________________________________________________________________________ test_logging_fails_ignore __________________________________________________________________________________ testdir = def test_logging_fails_ignore(testdir): """ Test qt_log_ignore config option. :type testdir: _pytest.pytester.TmpTestdir """ testdir.makeini( """ [pytest] qt_log_level_fail = CRITICAL qt_log_ignore = WM_DESTROY.*sent WM_PAINT...
As outlined in [Troubleshooting — pytest-qt documentation](https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html), when Qt calls abort, often the user doesn't have any useful information due to pytest's output capturing. I can see two ways around...
updates: - [github.com/asottile/pyupgrade: v3.15.1 → v3.15.2](https://github.com/asottile/pyupgrade/compare/v3.15.1...v3.15.2)
When an exception happens during the event loop, only a tight traceback is printed. ``` File "D:\tmp\tox\py39-PyQt5-all\lib\site-packages\napari\utils\events\containers\_evented_list.py", line 195, in insert self.events.inserted(index=index, value=value) File "D:\tmp\tox\py39-PyQt5-all\lib\site-packages\napari\utils\events\event.py", line 763, in __call__ self._invoke_callback(cb,...
I´m running into a recursive loop when using the ModelTester with recursive tree models. QAbstractItemModelTester gained an option to not call fetchMore with Qt6.4. ( https://doc.qt.io/qt-6/qabstractitemmodeltester.html#setUseFetchMore ) Since the _qt_tester...