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

Function test_deindent

testing/code/test_source.py:273–284  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

271
272
273def test_deindent() -> None:
274 from _pytest._code.source import deindent as deindent
275
276 assert deindent(["\tfoo", "\tbar"]) == ["foo", "bar"]
277
278 source = """\
279 def f():
280 def g():
281 pass
282 """
283 lines = deindent(source.splitlines())
284 assert lines == ["def f():", " def g():", " pass"]
285
286
287def test_source_of_class_at_eof_without_newline(_sys_snapshot, tmp_path: Path) -> None:

Callers

nothing calls this directly

Calls 1

deindentFunction · 0.90

Tested by

no test coverage detected