Example #1
0
 def test_nocut_equal(self):
     assert trim('', 0) == ''
     assert trim('string', 6) == 'string'
Example #2
0
 def test_integer_nocut(self):
     assert trim(12345, 5) == '12345'
Example #3
0
 def test_integer_cut(self):
     assert trim(12345678, 5) == '12345..'
Example #4
0
 def test_cut_zero(self):
     assert trim('string', 0) == '..'
Example #5
0
 def test_cut(self):
     assert trim('string', 3) == 'str..'
Example #6
0
 def test_negative(self):
     assert trim('string', -7) == '..'
Example #7
0
 def test_nocut_negative(self):
     assert trim('string', -1) == 'string'
Example #8
0
 def test_nocut_larger(self):
     assert trim('string', 7) == 'string'