Run py.test in ... sometimes fails with error: "INTERNALERROR> AttributeError: 'bool' object has no attribute 'test_project'"

I usually run py.test within pycharm which works well. However sometime it fails with the pytest error "AttributeError: 'bool' object has no attribute 'test_methodname'.

I never had any issue when running the test directly from a console. When running any other non-test script also from pycharm, I can usually launch the pytest afterwards.

 

Structure of the file is:

class Test_project:

    def test_project(self):

       assert fu == bar

 

Does anybody have a clue what could be the cause, or can help me point more precisely to the error.

 

Please sign in to leave a comment.