| 17 | class 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') |