ValueError: no such test method in : runTest

后端 未结 6 1102
时光取名叫无心
时光取名叫无心 2020-12-03 03:10

I have a test case:

class LoginTestCase(unittest.TestCase):
    ...

I\'d like to use it in a different test case:

class Edi         


        
6条回答
  •  感动是毒
    2020-12-03 03:44

    If you don't mind editing unit test module code directly, the simple fix is to add under case.py class TestCase a new method called runTest that does nothing.

    The file to edit sits under pythoninstall\Lib\unittest\case.py

    def runTest(self):
        pass
    

    This will stop you ever getting this error.

提交回复
热议问题