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

Method test_elide

IPython/terminal/tests/test_interactivshell.py:19–26  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

17class TestElide(unittest.TestCase):
18
19 def test_elide(self):
20 _elide('concatenate((a1, a2, ...), axis', '') # do not raise
21 _elide('concatenate((a1, a2, ..), . axis', '') # do not raise
22 nt.assert_equal(_elide('aaaa.bbbb.ccccc.dddddd.eeeee.fffff.gggggg.hhhhhh',''), 'aaaa.b…g.hhhhhh')
23
24 test_string = os.sep.join(['', 10*'a', 10*'b', 10*'c', ''])
25 expect_stirng = os.sep + 'a' + '\N{HORIZONTAL ELLIPSIS}' + 'b' + os.sep + 10*'c'
26 nt.assert_equal(_elide(test_string, ''), expect_stirng)
27
28 def test_elide_typed_normal(self):
29 nt.assert_equal(_elide('the quick brown fox jumped over the lazy dog', 'the quick brown fox', min_elide=10), 'the…fox jumped over the lazy dog')

Callers

nothing calls this directly

Calls 1

_elideFunction · 0.90

Tested by

no test coverage detected