Qt and Python; code easily using the Pytest framework
summary
pytest plus the pytest-qt plugin proves that Qt/Python GUIs become testable with concrete tools not promises: it exposes QTestLib, adds higher-level APIs like fixtures with dependency injection and yield-based teardown, offers wait_signal / wait_signals / wait_until / wait_callback helpers for async waits, provides a model tester for QAbstractItemModel correctness, captures Qt warnings and logging, translates C++ exceptions into test failures, and plugs into the ~750+ pytest plugin ecosystem for CI and reporting.
AI-written summary · about
chapters (14)
- 0:00Introduction and background
- 1:24Python and Qt overview
- 3:59Python-Qt bindings comparison
- 5:48Why use pytest
- 7:39pytest features and fixtures
- 10:28pytest-Qt plugin introduction
- 11:34Exception handling in tests
- 13:00Logging and warnings capture
- 14:49Qt event handling in tests
- 15:34Waiting for signals and conditions
- 17:26Advanced waiting techniques
- 18:36Qt model testing
- 20:21pytest plugins ecosystem
- 21:24Resources and Q&A
related talks
25mTest It!
58mIntroduction to Qt
57mQuickly Testing Qt Desktop Applications with Approval Tests
33mPythonizing Qt
49mQuickly and Effectively Testing Qt Desktop Applications
46mBehavior Driven GUI Testing of Embedded, Mobile and Desktop Qt HMIs
25mDeveloping cutting-edge applications with PyQt
01h 33mPython and C++: the best of both worlds
