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

Function test_SList

IPython/utils/tests/test_text.py:207–213  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

205 nt.assert_is_instance(lss.p[0], Path)
206
207def test_SList():
208 sl = text.SList(['a 11', 'b 1', 'a 2'])
209 nt.assert_equal(sl.n, 'a 11\nb 1\na 2')
210 nt.assert_equal(sl.s, 'a 11 b 1 a 2')
211 nt.assert_equal(sl.grep(lambda x: x.startswith('a')), text.SList(['a 11', 'a 2']))
212 nt.assert_equal(sl.fields(0), text.SList(['a', 'b', 'a']))
213 nt.assert_equal(sl.sort(field=1, nums=True), text.SList(['b 1', 'a 2', 'a 11']))

Callers

nothing calls this directly

Calls 3

grepMethod · 0.95
fieldsMethod · 0.95
sortMethod · 0.95

Tested by

no test coverage detected