Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Aggregating multiple test cases from multiple modules to run in PyDev TestRunner

What's the best way to aggregate test cases from multiple modules such that a single test run will execute them all and present the results in the PyDev UnitTest window?

like image 407
Graeme Avatar asked Jun 24 '12 19:06

Graeme


1 Answers

There are many choices in PyDev depending on what you want:

  1. Right-click a folder and choose 'run as > Python unit-test' (will run all modules below the dir as unit-tests).

  2. Right-click multiple python modules and choose 'run as > Python unit-test' (will load the tests for all those modules and run them).

  3. Create a module which imports all the tests with a different name and select 'run as > Python unit-test' for that module.

i.e.:

from test_mod1 import Test as Test1
from test_mod2 import Test as Test2
like image 61
Fabio Zadrozny Avatar answered Nov 13 '22 10:11

Fabio Zadrozny