pyunit and Eclipse

Fabio Zadrozny fabioz at esss.com.br
Thu Aug 4 06:58:47 EDT 2005


Steve Jorgensen wrote:

>I was working with a friend on a project Monday night, and tried to run a
>pyunit test from Eclipse, and nothing seemed to happen.  We finally figured
>out that the test is doing exactly what it's supposed to do, but the pyunit
>output isn't making it to the Eclipse console window.  We get the same result
>if I run the module as a pyunit test using Eclipse, or if we simply have the
>program call unittest.main, and run that.
>
>As a workaround, we just ran the tests from a command prompt which worked well
>enough, but it would be nice to fix the problem.
>  
>
Which pydev version? How did you do the run?

Guessing those...

Just a single file, yes, it would be just unittest.main()...

Anyway, there is an issue in Eclipse (happens in java too) that is the 
following: if you do a run and it is too fast, sometimes the output does 
not show (usually if you re-run it --Ctrl+F11 -- , it works, but not 
always).

If you are running the unit-test for a folder, you don't need the 
unittest.main(), as it should auto-import the test-cases in the files 
below the folder (recursively) and run them.

Cheers,

Fabio

-- 
Fabio Zadrozny
------------------------------------------------------
Software Developer

ESSS - Engineering Simulation and Scientific Software
www.esss.com.br

PyDev - Python Development Enviroment for Eclipse
pydev.sf.net
pydev.blogspot.com





More information about the Python-list mailing list