MCPcopy Index your code
hub / github.com/ipython/ipython / nest_case

Method nest_case

tests/test_async_helpers.py:321–331  ·  view source on GitHub ↗
(context, case)

Source from the content-addressed store, hash-verified

319 )
320
321 def nest_case(context, case):
322 # Detect indentation
323 lines = context.strip().splitlines()
324 prefix_len = 0
325 for c in lines[-1]:
326 if c != " ":
327 break
328 prefix_len += 1
329
330 indented_case = indent(case, " " * (prefix_len + 4))
331 return context + "\n" + indented_case
332
333 # Gather and run the tests
334

Callers

nothing calls this directly

Calls 1

indentFunction · 0.85

Tested by

no test coverage detected