MCPcopy Create free account
hub / github.com/ipython/ipython / nest_case

Method nest_case

IPython/core/tests/test_async_helpers.py:184–194  ·  view source on GitHub ↗
(context, case)

Source from the content-addressed store, hash-verified

182 """)))
183
184 def nest_case(context, case):
185 # Detect indentation
186 lines = context.strip().splitlines()
187 prefix_len = 0
188 for c in lines[-1]:
189 if c != ' ':
190 break
191 prefix_len += 1
192
193 indented_case = indent(case, ' ' * (prefix_len + 4))
194 return context + '\n' + indented_case
195
196 # Gather and run the tests
197

Callers

nothing calls this directly

Calls 1

indentFunction · 0.85

Tested by

no test coverage detected