Update for PyQt6 compatibility
See original GitHub issuePyQt6 has been released but pytest-qt does not yet support the new version. This causes most tests in my project to fail with the following error, though the application works as expected.
Example error (last few lines only):
INTERNALERROR> File "/usr/local/var/pyenv/versions/3.9.0/envs/mn390/lib/python3.9/site-packages/pytestqt/qt_compat.py", line 83, in set_qt_api
INTERNALERROR> raise RuntimeError(msg)
INTERNALERROR> RuntimeError: pytest-qt requires either PySide, PySide2, PyQt4 or PyQt5 to be installed
INTERNALERROR> PyQt4.QtCore: No module named 'PyQt4'
INTERNALERROR> PyQt5.QtCore: No module named 'PyQt5'
INTERNALERROR> PySide.QtCore: No module named 'PySide'
INTERNALERROR> PySide2.QtCore: No module named 'PySide2'
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
PyQt5 vs PyQt6: What are the differences, and is it time to ...
The good news is that the change is backwards compatible: the fully-qualified names also work in PyQt5. So you can make the changes...
Read more >PyQt6 - PyPI
Qt is set of cross-platform C++ libraries that implement high-level APIs for accessing many aspects of modern desktop and mobile systems.
Read more >PyQt5 vs. PyQt6: Syntax Changes, Licenses, and Should you ...
PyQt5 vs. PyQt6 : Syntax Changes, Licenses, and Should you upgrade ? [2022].
Read more >PyQt6 Released! What's new? - YouTube
So, PyQt6 is officially out! In this video, I will go over some of the changes over PyQt5.Buy Me a Coffee? Your support...
Read more >Msys update pyqt from version 5 to version 6 - Stack Overflow
First i follow this solution, but then and PyQt5 had the same problem so,; I run pacman -Qqn | pacman -S - (updates...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@othalan @GuillaumeFavelier @rbreu If anyone of you has a PyQt6 project to test with, it’d be great if you could try #340. For my own project I’m still waiting for QtWebEngine to come back with Qt 6.2, but at least pytest-qt’s selftests now work with PyQt6 🎉
Hi, I just wanted to let you know that I have ported all my unit tests from my previous workaround to pytest-qt and it works. Thank you so much!