[Tutor] How to? Using the GUI interface of PyUnit under
Windows (XP)
Kent Johnson
kent_johnson at skillsoft.com
Mon Sep 13 05:48:25 CEST 2004
I think if your tests are in a package, you can run them in unittestgui by
giving the full package name of the test suite function. Of course the
package will have to be in your sys.path. e.g.
mypackage/
__init__.py # needed to create a package
mymodule.py
contains mytest()
then in unittestgui tell it to run mypackage.mymodule.mytest
Kent
At 08:15 PM 9/12/2004 -0300, André Roberge wrote:
>Sorry for the simple question; my last real programming experiences
>were years ago using C under MS-DOS (and FORTRAN on mainframes). Back
>then, dealing with environment variables and paths seemed second nature.
>After many years of doing other stuff, I'm starting to program again,
>just for the fun of it (and to teach my kids),
>learning Python along the way.
>I find that I am now addicted to the simplicity of using GUI programs
>instead of command lines, and now I am stuck :-(
>
>I want to learn the "test-driven development" using the unittestgui
>that comes with PyUnit. I found that I could run
>the tests examples by moving everything
>(i.e. unittestguy.py as well as the python modules and test-modules)
>in the same directory, but can't seem to get it to work otherwise.
>
>I would like to keep my tests and the corresponding modules in separate
>directories,
>just to keep things better organised,
>and not have to move unittestgui all the time.
>
>Any pointers would be appreciated.
>
>A very embarrassed "old fart/newbie",
>
>André Roberge
>
>
>_______________________________________________
>Tutor maillist - Tutor at python.org
>http://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list