Open buhtz opened 2 years ago
The fix for this was included in version 3.4.1
. See #256 for details on the fix. Thanks for your detailed report! 😄
Sorry I would reopen this.
I have nearly the same problem with a ModuleNotFoundError
.
When I explicite name the test via green tests.test_reader
no tests found and no error is thrown.
When I do discover via green
the (expected) ModuleNotFoundError
is thrown.
The ModuleNotFoundError is still there and not catched
@buhtz Do you have any information on how to reproduce this?
green --version
/cc @sodul for followup if desired
My current environment:
Green 3.4.0, Coverage 6.2, Python 3.9.4
on Windows10I run a test by naming it explicit:
There are two problems about that output:
Run 0 tests
)SyntaxError
is not thrown.Unittest itself shows this output
This is the MWE. The file is in a folder named
tests
and there is also an empty__init__.py
in the same folder.The last line should cause a syntax error.
When you fix the syntax of the MWE the test is found by green. So I think the not catched SyntaxError also causing the missing test.