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

Function _ascii_escaped_by_config

src/_pytest/python.py:1350–1360  ·  view source on GitHub ↗
(val: Union[str, bytes], config: Optional[Config])

Source from the content-addressed store, hash-verified

1348
1349
1350def _ascii_escaped_by_config(val: Union[str, bytes], config: Optional[Config]) -> str:
1351 if config is None:
1352 escape_option = False
1353 else:
1354 escape_option = config.getini(
1355 "disable_test_id_escaping_and_forfeit_all_rights_to_community_support"
1356 )
1357 # TODO: If escaping is turned off and the user passes bytes,
1358 # will return a bytes. For now we ignore this but the
1359 # code *probably* doesn't handle this case.
1360 return val if escape_option else ascii_escaped(val) # type: ignore
1361
1362
1363def _idval(

Callers 2

_idvalFunction · 0.85
_idvalsetFunction · 0.85

Calls 2

ascii_escapedFunction · 0.90
getiniMethod · 0.45

Tested by

no test coverage detected