pytest-dev / pytest-qt

pytest plugin for Qt (PyQt5/PyQt6 and PySide2/PySide6) application testing
https://pytest-qt.readthedocs.io
MIT License
409 stars 70 forks source link

Avoid using .isdeleted/.isValid in tests #374

Closed The-Compiler closed 3 years ago

The-Compiler commented 3 years ago

This has caused us a lot of trouble since the 4.0.0 release (see #369 and #373). However, it was only neeeded for tests, where we might as well just check if the object is alive by calling a Qt method and checking for the exception (RuntimeError with all Qt APIs).

Fixes #373

nicoddemus commented 3 years ago

However, it was only neeeded for tests

Ahh didn't realize that. In that case absolutely. 👍

The-Compiler commented 3 years ago

Sure thing! Took the freedom to trigger a 4.0.2 release with this in.

tlambert03 commented 3 years ago

thanks for the quick turnaround!