Python unittest and test discovery

前端 未结 4 1759
一生所求
一生所求 2020-12-18 20:47

What exactly I need to do to make python\'s unittest work? I checked the official documentation, SO questions and even tried using nose, b

4条回答
  •  太阳男子
    2020-12-18 21:41

    Test functions must start with the name test So fooTest should be testFoo. See the docs here

    Also, there isn't a need for the __init__.py file, assuming those are the only two files in your tests directory.

提交回复
热议问题