nose2 icon indicating copy to clipboard operation
nose2 copied to clipboard

test generation failures swallowed silently by such createTests

Open jpellerin opened this issue 13 years ago • 6 comments

AttributeErrors during test generation are swallowed silently unless the test module is explicitly loaded. In that case, they are hard to debug because they appear only as test failures with no usable traceback.

jpellerin avatar Nov 26 '12 15:11 jpellerin

I believe I just got bitten by this bug. Or at least it seems related. I had incorrectly defined pythonpath. When running in sequence (i.e. plain 'nose2') I get the stack traces showing the import errors. However when running in parallel ('nose2 --plugin=nose2.plugins.mp -N 20') all I see is:

test_not_found (nose2.loader.LoadTestsFailure) ... ERROR
test_not_found (nose2.loader.LoadTestsFailure) ... ERROR
test_not_found (nose2.loader.LoadTestsFailure) ... ERROR
test_not_found (nose2.loader.LoadTestsFailure) ... ERROR

======================================================================
ERROR: test_not_found (nose2.loader.LoadTestsFailure)
----------------------------------------------------------------------
AttributeError: 'module' object has no attribute 'ModuleImportFailure'

======================================================================
ERROR: test_not_found (nose2.loader.LoadTestsFailure)
----------------------------------------------------------------------
AttributeError: 'module' object has no attribute 'ModuleImportFailure'
....

sanga avatar Nov 29 '12 09:11 sanga

Could any of you please provide a regression test or a code example so I can understand better what is wrong and how to fix it exactly?

thedrow avatar Jul 18 '13 22:07 thedrow

Actually, you can ignore my comment. On further investigation the thing I'm referring to is a bug in the mp plugin

sanga avatar Jul 19 '13 06:07 sanga

@sanga Is there an opened issue for that bug?

thedrow avatar Jul 19 '13 08:07 thedrow

there is now: https://github.com/nose-devs/nose2/issues/109

sanga avatar Jul 19 '13 08:07 sanga

I can't reproduce this

ptthiem avatar Nov 10 '17 15:11 ptthiem