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

Function test_strip_initial_indent

IPython/core/tests/test_magic.py:1181–1188  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1179 nt.assert_equal(w, []) # no warnings
1180
1181def test_strip_initial_indent():
1182 def sii(s):
1183 lines = s.splitlines()
1184 return '\n'.join(code.strip_initial_indent(lines))
1185
1186 nt.assert_equal(sii(" a = 1\nb = 2"), "a = 1\nb = 2")
1187 nt.assert_equal(sii(" a\n b\nc"), "a\n b\nc")
1188 nt.assert_equal(sii("a\n b"), "a\n b")
1189
1190def test_logging_magic_quiet_from_arg():
1191 _ip.config.LoggingMagics.quiet = False

Callers

nothing calls this directly

Calls 1

siiFunction · 0.85

Tested by

no test coverage detected