Hi Paul,

On 3/4/2015 16:49, Paul McNett wrote:
On 3/4/15 5:19 AM, Werner wrote:
On 3/3/2015 14:58, Paul McNett wrote:

...
To be clear, it isn't a hack to have 'if __name__ == "__main__"' block...
Yes, I ment it being a hack when used at the top of the file to set
__package__ etc, not when used to run code as such.

Oh, that. Yeah, I hate that. But that isn't a symptom of having the ability to run a quick sanity test on the module, but rather a symptom of how we load the ui library (namespace mangling I never should have done).

But I am not sure I that we see eye to eye on the test/demo stuff.

Don't worry about it. In my opinion there's a huge difference between the use cases:

1) new user running a demo of all the ui widgets
2) developer making a change to dTextbox and wants to see that it it still works correctly
3) unit testing

DaboDemo is for 1. The __main__ tests in uiwx/dTextbox.py etc. are for 2.
But if we are going to have uiwx and uiwx2 (or whatever it will be called this will be duplicated and it will not be the same over time. My thought was that it moves to 'demo/ui' and it should work against both, ideally even all dabo/ui/xxxxx and it could be used for both 1 and 2
A new /tests directory would be for 3, and probably won't include actually instantiating controls unless we have a way to automatically test them (not relying on the user).
Anyhow, for the moment I'll concentrate on 3.

Werner

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to