pyunit and Eclipse

  • Thread starter Steve Jorgensen
  • Start date
S

Steve Jorgensen

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.
 
F

Fabio Zadrozny

Steve said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top