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