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