Closed3
pytest coverage reportをカスタマイズ
参考URL
ref1
docstring内に Tests, Expects
要素が必須
ref2
ref3
単に改行を含んだdocstringを反映させたいだけであれば下記でOK
def pytest_html_results_table_row(report, cells):
+ tmp_ele = ""
+ for ele in report.description.splitlines():
+ tmp_ele += ele + " \n"
+ cells.insert(2, html.td(tmp_ele, style="white-space: pre-wrap; word-wrap: break-word;"))
- cells.insert(2, html.td(report.description)
cells.insert(1, html.td(datetime.utcnow(), class_="col-time"))
cells.pop()
このスクラップは2023/03/09にクローズされました