MCPcopy Create free account
hub / github.com/pytest-dev/pytest / repl

Function repl

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected