I like the comment in the issue: "... contains hopeless code". We've all been there...
J^n On Tuesday, September 13, 2022 at 12:14:32 PM UTC+1 Edward K. Ream wrote: > 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/91103c78-940f-4fc2-9b90-fe66b4754461n%40googlegroups.com.
