One of Leo's biggest Ahas has come last.

*Aha!* As explained in #2827 
<https://github.com/leo-editor/leo-editor/issues/2827>, creating unit tests 
for Qt code is far easier than I ever imagined. PR #2840 
<https://github.com/leo-editor/leo-editor/pull/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 <https://github.com/leo-editor/leo-editor/issues/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

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/e2d8e9dd-3dbd-4f0d-b334-ca9ef8a38c77n%40googlegroups.com.

Reply via email to