- Messages sent by
qDebug
,qWarning
,qCritical
are captured and displayed when tests fail, similar to pytest-catchlog. Also, tests can be configured to automatically fail if an unexpected message is generated. (See docs). - New method
waitSignals
: will block untill all signals given are triggered, see docs (thanks @The-Compiler for idea and complete PR). - New parameter
raising
towaitSignals
andwaitSignals
: whenTrue
(defaults toFalse
) will raise aqtbot.SignalTimeoutError
exception when timeout is reached, see docs (thanks again to @The-Compiler for idea and complete PR). pytest-qt
now requirespytest
version >= 2.7.
Internal changes to improve memory management
QApplication.exit()
is no longer called at the end of the test session and theQApplication
instance is not garbage collected anymore;QtBot
no longer receives a QApplication as a parameter in the constructor, always referencingQApplication.instance()
now; this avoids keeping an extra reference in theqtbot
instances.deleteLater
is called on widgets added inQtBot.addWidget
at the end of each test;QApplication.processEvents()
is called at the end of each test to make sure widgets are cleaned up;