Closed3

pytest coverage reportをカスタマイズ

shin_t_o_shin_t_o_
shin_t_o_shin_t_o_

単に改行を含んだ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にクローズされました