pypi pytest-qt 1.1.1
Catching exceptions in Qt virtual methods

latest releases: 4.4.0, 4.3.1, 4.2.0...
9 years ago
  • Added stop as an alias for stopForInteraction (#10, thanks @itghisi)
  • Now exceptions raised in virtual methods make tests fail, instead of silently passing (#11). If an exception is raised, the test will fail and it exceptions that happened inside virtual calls will be printed as such:
E           Failed: Qt exceptions in virtual methods:
E           ________________________________________________________________________________
E             File "x:\pytest-qt\pytestqt\_tests\test_exceptions.py", line 14, in event
E               raise ValueError('mistakes were made')
E
E           ValueError: mistakes were made
E           ________________________________________________________________________________
E             File "x:\pytest-qt\pytestqt\_tests\test_exceptions.py", line 14, in event
E               raise ValueError('mistakes were made')
E
E           ValueError: mistakes were made
E           ________________________________________________________________________________

Thanks to @jdreaver for request and sample code!

  • Fixed documentation for QtBot: it was not being rendered in the docs due to an import error.

Don't miss a new pytest-qt release

NewReleases is sending notifications on new releases.