From 1bc8741479f81b4a9cc491539a2b5ec57780f2c2 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sat, 20 Apr 2024 15:27:51 +0200 Subject: [PATCH] dashboard: Don't use
for tests with no docstring --- irctest/dashboard/format.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/irctest/dashboard/format.py b/irctest/dashboard/format.py index b8d286b..2385340 100644 --- a/irctest/dashboard/format.py +++ b/irctest/dashboard/format.py @@ -245,16 +245,17 @@ def build_test_table( # TODO: only hash test parameter row_anchor = md5sum(row_anchor) + doc = docstring( + getattr(getattr(module, class_name), test_name.split("[")[0]) + ) row = HTML.tr( HTML.th( HTML.details( HTML.summary(HTML.a(test_name, href=f"#{row_anchor}")), - docstring( - getattr( - getattr(module, class_name), test_name.split("[")[0] - ) - ), - ), + doc, + ) + if doc + else HTML.a(test_name, href=f"#{row_anchor}"), class_="test-name", ), id=row_anchor,