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

Function test_deindent

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

Source from the content-addressed store, hash-verified

273
274
275def test_deindent() -> None:
276 from _pytest._code.source import deindent as deindent
277
278 assert deindent(["\tfoo", "\tbar"]) == ["foo", "bar"]
279
280 source = """\
281 def f():
282 def g():
283 pass
284 """
285 lines = deindent(source.splitlines())
286 assert lines == ["def f():", " def g():", " pass"]
287
288
289def 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