One of Leo's biggest Ahas has come last.
Aha! As explained in
#2827, creating unit tests for Qt code is far easier than I ever imagined. PR
#2840 (merged into devel) demonstrates that:
- Leo could have supported such tests ever since Leo abandoned tests based on @test nodes!
- Only one change was needed: Previously, LeoUnitTest.setUp created a null gui, regardless of g.app.gui. Now, setUp just uses g.app.gui. That's all!
Summary
Folks, this is an earth-shaking Aha. We can easily create coverage tests for files such as qt_text.py and qt_tree.py.
However, I plan to create new tests only when new Qt bugs arise :-)
Edward
P.S. Issue
#2846 suggests experimenting with testing interactive code such as Qt dialogs. #2846 will likely be the last issue included in Leo 6.7.0.
EKR