Пример #1
0
    def test_no_digits(self):
        '''Testing remove_digits() with a string containing no digits.
        '''

        self.assertEqual(asstfile.remove_digits('nope, there really aren\'t any digits here.'), 
                         'nope, there really aren\'t any digits here.', 
                         'Removing digits from a string with no digits should result in the identical string.')
Пример #2
0
    def test_several_digits(self):
        '''Testing remove_digits() with a string containing multiple digits.
        '''

        self.assertEqual(asstfile.remove_digits('m435345u34534lti543543pl345e3 45d345i3g4534i5ts345'),
                         'multiple digits', 
                         'Removing digits from a string with multiple digits should result in a string with every digit removed.')
Пример #3
0
    def test_empty_string(self):
        '''Testing remove_digits() with an empty string.
        '''

        self.assertEqual(asstfile.remove_digits(''),
                         '', 
                         'Removing digits from the empty string should result in the empty string.')