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

Function test_elide

tests/test_interactivshell.py:30–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28
29
30def test_elide():
31 _elide("concatenate((a1, a2, ...), axis", "", min_elide=30) # do not raise
32 _elide("concatenate((a1, a2, ..), . axis", "", min_elide=30) # do not raise
33 assert (
34 _elide("aaaa.bbbb.ccccc.dddddd.eeeee.fffff.gggggg.hhhhhh", "", min_elide=30)
35 == "aaaa.b…g.hhhhhh"
36 )
37
38 test_string = os.sep.join(["", 10 * "a", 10 * "b", 10 * "c", ""])
39 expect_string = os.sep + "a" + "\N{HORIZONTAL ELLIPSIS}" + "b" + os.sep + 10 * "c"
40 assert _elide(test_string, "", min_elide=30) == expect_string
41
42
43def test_elide_typed_normal():

Callers

nothing calls this directly

Calls 1

_elideFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…