Run setUp only once for a set of automated tests

前端 未结 8 1252
逝去的感伤
逝去的感伤 2020-12-13 05:15

My Python version is 2.6.

I would like to execute the test setUp method only once since I do things there which are needed for all tests.

My idea was to crea

8条回答
  •  不知归路
    2020-12-13 06:03

    for python >3 you can do it by defining startTestRun,stopTestRun of unittest.TestResult class. answer https://stackoverflow.com/a/64892396/2679740

提交回复
热议问题