In my PyCharm (2016.3.3) project I have a package folder called 'tests', which holds some test modules (using unittest
), e.g. 'test_A.py,' 'test_B.py.'
When I try to run the tests in one of these modules, or all tests in the entire 'tests' package, I get a nose_helper.failure.Failure
due to AttributeError: 'module' object has no attribute 'test_A'
(and same for the other test modules).
When I run the modules outside PyCharm they work without issue.
Does anyone know the reason, and how to solve this?
There are many similar questions here, e.g. 1, 2, 3, etc., but none of those solved my issue.