unittest colored output

前端 未结 9 2095
予麋鹿
予麋鹿 2020-12-13 17:39

I use unittest (actually unittest2) for Python testing, together with Python Mock for mocking objects and nose to run all tests in a single pass.

9条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-13 17:58

    pytest can do this with no changes needed for unit tests.

    Now install pytest.

    pip install --user pytest
    

    And run the tests to see the color!

提交回复
热议问题