MCPcopy
hub / github.com/pytest-dev/pytest / markup

Method markup

src/_pytest/_io/terminalwriter.py:107–115  ·  view source on GitHub ↗
(self, text: str, **markup: bool)

Source from the content-addressed store, hash-verified

105 return wcswidth(self._current_line)
106
107 def markup(self, text: str, **markup: bool) -> str:
108 for name in markup:
109 if name not in self._esctable:
110 raise ValueError(f"unknown markup: {name!r}")
111 if self.hasmarkup:
112 esc = [self._esctable[name] for name, on in markup.items() if on]
113 if esc:
114 text = "".join(f"\x1b[{cod}m" for cod in esc) + text + "\x1b[0m"
115 return text
116
117 def sep(
118 self,

Callers 9

writeMethod · 0.95
add_color_levelMethod · 0.45
summary_statsMethod · 0.45
show_xfailedMethod · 0.45
show_xpassedMethod · 0.45
show_skipped_foldedMethod · 0.45
show_skipped_unfoldedMethod · 0.45
_get_node_id_with_markupFunction · 0.45

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected