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

Function _ascii_escaped_by_config

src/_pytest/python.py:1561–1571  ·  view source on GitHub ↗
(val: str | bytes, config: Config | None)

Source from the content-addressed store, hash-verified

1559
1560
1561def _ascii_escaped_by_config(val: str | bytes, config: Config | None) -> str:
1562 if config is None:
1563 escape_option = False
1564 else:
1565 escape_option = config.getini(
1566 "disable_test_id_escaping_and_forfeit_all_rights_to_community_support"
1567 )
1568 # TODO: If escaping is turned off and the user passes bytes,
1569 # will return a bytes. For now we ignore this but the
1570 # code *probably* doesn't handle this case.
1571 return val if escape_option else ascii_escaped(val) # type: ignore
1572
1573
1574class Function(PyobjMixin, nodes.Item):

Callers 2

_resolve_idsMethod · 0.85
_idval_from_valueMethod · 0.85

Calls 2

ascii_escapedFunction · 0.90
getiniMethod · 0.45

Tested by

no test coverage detected