Example #1
0
 def test_oneletter(self):
     res = techniques.slice_ends('flabbergasted', count=1)
     self.assertEqual(res, 'labbergaste')
Example #2
0
 def test_none(self):
     res = techniques.slice_ends('flabbergasted', count=None)
     self.assertEqual(res, 'flabbergasted')
Example #3
0
 def test_empty(self):
     res = techniques.slice_ends('flabbergasted', count=0)
     self.assertEqual(res, 'flabbergasted')
Example #4
0
 def test_fourletter(self):
     res = techniques.slice_ends('flabbergasted', count=4)
     self.assertEqual(res, 'berga')
Example #5
0
 def test_threeletter(self):
     res = techniques.slice_ends('flabbergasted', count=3)
     self.assertEqual(res, 'bbergas')
Example #6
0
 def test_twoletter(self):
     res = techniques.slice_ends('flabbergasted', count=2)
     self.assertEqual(res, 'abbergast')