Exemple #1
0
 def test_index_of_any(self):
     self.assertEqual(string_utils.index_of(None, ['Word']), -1)
     self.assertEqual(string_utils.index_of('Test Word', None), -1)
     self.assertEqual(string_utils.index_of_any('Test Word', ['Word']), 5)
     self.assertEqual(string_utils.index_of_any('Test Word', ['st', 'or']), 2)
Exemple #2
0
 def test_index_of(self):
     self.assertEqual(string_utils.index_of(None, 'Word'), -1)
     self.assertEqual(string_utils.index_of('Test Word', None), -1)
     self.assertEqual(string_utils.index_of('Test Word', 'Word'), 5)
     self.assertEqual(string_utils.index_of('Test Word', 'st'), 2)