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

Function test_SList

tests/test_text.py:145–151  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

143
144
145def test_SList():
146 sl = text.SList(["a 11", "b 1", "a 2"])
147 assert sl.n == "a 11\nb 1\na 2"
148 assert sl.s == "a 11 b 1 a 2"
149 assert sl.grep(lambda x: x.startswith("a")) == text.SList(["a 11", "a 2"])
150 assert sl.fields(0) == text.SList(["a", "b", "a"])
151 assert 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…