Skip to content

Commit 741d4f8

Browse files
committed
Show test names in bold
1 parent bcaff45 commit 741d4f8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/_pytest/terminal.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1265,7 +1265,12 @@ def _build_collect_only_summary_stats_line(
12651265

12661266
def _get_node_id_with_markup(tw: TerminalWriter, config: Config, rep: BaseReport):
12671267
nodeid = config.cwd_relative_nodeid(rep.nodeid)
1268-
return nodeid
1268+
path, *parts = nodeid.split("::")
1269+
if parts:
1270+
parts_markup = tw.markup("::".join(parts), white=True, bold=True)
1271+
return path + "::" + parts_markup
1272+
else:
1273+
return path
12691274

12701275

12711276
def _format_trimmed(format: str, msg: str, available_width: int) -> Optional[str]:

0 commit comments

Comments
 (0)