Display python unittest results in nice, tabular form

后端 未结 3 1562
心在旅途
心在旅途 2020-12-07 22:46

I am writing a Pythonic tool which validates the correctness of a certain system. Each validation is written as a Python unittest, and the report looks like:



        
3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-07 23:33

    I would like to add my information as a comment into alecxe's answer, but I do not have enough reputation for that.

    In case of someone still looking for an answer, I forked HTMLTestRunner into a simple TestRunner, which has a tabular, colored, terminal-friendly output. This is a sample of its output:

    The source code is at https://gist.github.com/viniciusd/73e6eccd39dea5e714b1464e3c47e067

    I shall rewrite it from scratch soon but keeping the output format.

提交回复
热议问题