Python unittest: cancel all tests if a specific test fails

前端 未结 4 882
刺人心
刺人心 2020-12-31 12:42

I am using unittest to test my Flask application, and nose to actually run the tests.

My first set of tests is to ensure the testing enviro

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-31 13:23

    You can skip entire test cases by calling skipTest() in setUp(). This is a new feature in Python 2.7. Instead of failing the tests, it will simply skip them all.

提交回复
热议问题