[Tutor] Best Code testing practice?

Matt D md123 at nycap.rr.com
Thu Jun 20 17:11:48 CEST 2013


On 06/20/2013 10:49 AM, Oscar Benjamin wrote:
> On 20 June 2013 15:32, Matt D <md123 at nycap.rr.com> wrote:
>> all i really want to do is test the the GUI code.   i am working on a
>> 'tab' in a notebook of 7 tabs, which is itself part of a large python
>> program which gets all of its computations done in C++.  The code for
>> 'tab', or wxPanel really, i am using is in one file.
>> But i dont need to get into all that at this point.  all i want to be
>> able to do is make a small sample app that mimics the one tab i am
>> working on and be able to run it to see if the lay out and dialogs are
>> correct.
> 
> Then make a small app that has just one tab (or has six dummy tabs if
> necessary). When this app runs it should use the same function from
> your main application to lay out the widgets but but it shouldn't bind
> the (same) event handlers.
> 
right make a small sample app.  exactly.  im sorry if im dense or
whatever and obviously i am super new to this process. but i can write
the scripts in gedit and then what?  how do i run that file and make the
gui start? should i be doing something like this?:

>>> execfile('filename.py')





More information about the Tutor mailing list