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. 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).
So, to show it better what I intended I did the test/demo stuff for
grid.py, see last commit in '5fef45: have been moved to tests/unittest'
on the phoenix2ndtry branch, it can always be reverted.
Don't revert anything at this point. Keep going. I'd like to get a
feeling for what the consensus is and we can hack it together then.
I think we agree that everything which uses 'unittest' under dabo/dabo
should be moved to dabo/tests/unittests.
I think so.
Paul
_______________________________________________
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]