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

Function repl

src/_pytest/junitxml.py:48–53  ·  view source on GitHub ↗
(matchobj: re.Match[str])

Source from the content-addressed store, hash-verified

46 """
47
48 def repl(matchobj: re.Match[str]) -> str:
49 i = ord(matchobj.group())
50 if i <= 0xFF:
51 return f"#x{i:02X}"
52 else:
53 return f"#x{i:04X}"
54
55 # The spec range of valid chars is:
56 # Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]

Callers

nothing calls this directly

Calls 1

groupMethod · 0.80

Tested by

no test coverage detected