On Nov 12, 4:51 pm, "Edward K. Ream" <[email protected]> wrote:
> At present, tests that use Leo's Qt gui fail when run externally because such
> tests use a null gui.
I was mistaken. leoBridge already properly inits a nullGui, nullFrame,
nullBody, etc.
For example: the following unit test passes when run externally:
assert g.app.isExternalUnitTest
body = c.frame.body
assert repr(body.widget).startswith('stringTextWidget')
assert body.widget == body.bodyCtrl
w = c.frame.body.bodyCtrl
w.setAllText(p.b)
assert p.b == w.getAllText()
This is good news. It means that unit tests that fail when run
externally are failing for other reasons. Two reasons come
immediately to mind:
1. Missing code:
All support code must be in an @mark-for-unit-tests tree so that it
will be copied to dynamicUnitTest.leo.
2. Changed file paths:
g.app.loadDir (or other paths) might be different in
dynamicUnitTest.leo I'd like to eliminate dependence on external files
in the unit tests. This will reduce the weight of tests.
Point 1 should be easy to fix. Point 2 may take longer, but affects
few tests.
In short, I expect to make changes today that will allow most, if not
all, unit tests in unitTest.leo to work when run externally. This
will be a big step forward.
Edward
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en.