OpenMDAO / testflo

A simple python testing framework that can run unit tests under MPI (or not).
Other
3 stars 7 forks source link

Run on sub-sub-modules does not work #24

Closed relf closed 5 years ago

relf commented 5 years ago

With testflo 1.3.4 and the example from the README, I get:

(base) D:\rlafage\workspace\OpenMDAO\openmdao>testflo openmdao.core.test.test_problem
openmdao.core.test.test_problem ... FAIL (00:00:0.00, 0 MB)
Traceback (most recent call last):
  File "d:\rlafage\miniconda3\lib\site-packages\testflo\discover.py", line 129, in _module_iter
    fname, mod = get_module(filename)
  File "d:\rlafage\miniconda3\lib\site-packages\testflo\util.py", line 309, in get_module
    raise ImportError("can't import %s" % modpath)
ImportError: can't import openmdao.core.test.test_problem

The following tests failed:
openmdao.core.test.test_problem:openmdao.core.test.test_problem

Passed:  0
Failed:  1
Skipped: 0

Ran 1 test using 4 processes
Wall clock time:   00:00:0.52

(base) D:\rlafage\workspace\OpenMDAO\openmdao>testflo openmdao.core.test
openmdao.core.test ... FAIL (00:00:0.00, 0 MB)
Traceback (most recent call last):
  File "d:\rlafage\miniconda3\lib\site-packages\testflo\discover.py", line 129, in _module_iter
    fname, mod = get_module(filename)
  File "d:\rlafage\miniconda3\lib\site-packages\testflo\util.py", line 309, in get_module
    raise ImportError("can't import %s" % modpath)
ImportError: can't import openmdao.core.test

The following tests failed:
openmdao.core.test:openmdao.core.test

Passed:  0
Failed:  1
Skipped: 0

Ran 1 test using 4 processes
Wall clock time:   00:00:0.50

while running on sub-module is ok


(base) D:\rlafage\workspace\OpenMDAO\openmdao>testflo openmdao.core
.....................S.....S.S..SS.S.S.S.........................................................................S....SSSSSSSSSSS......SS.........SS.SSSSSS.......S...............S.SSSSS.......S..............................SSSS....SSSSSSSSS
SSS.SS.SSSSSS................................................................................................................................................................................................................S.SSSSSSS.SSSSSSSSS
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS.................SSSSSSSSS..................................................S.SSSSSSSSSSS.XXXXX.X.S.S.....S................................

OK

Passed:  516
Failed:  0
Skipped: 139

Ran 655 tests using 4 processes
Wall clock time:   00:00:7.57

relf commented 5 years ago

ok, my bad. It is openmdao.core.tests not test.