Pytest - custom output of test results

前端 未结 1 785
长情又很酷
长情又很酷 2021-01-18 20:18

I want to completely custom tests results output. In unittest I can implement my own test runner by example of unittest.TextTestRunner. How can I d

1条回答
  •  生来不讨喜
    2021-01-18 20:36

    You'll need to work with pytest hooks:

    py.test calls hook functions to implement initialization, running, test execution and reporting.

    Also see:

    • py.test code snippets
    • pycon tutorial session (it also goes through using hooks)

    0 讨论(0)
提交回复
热议问题