示例#1
0
 def test_recapitalize_word(self):
     self.assertEqual(recapitalize_word('Dupont'), 'Dupont')
     self.assertEqual(recapitalize_word('van'), 'van')
     self.assertEqual(recapitalize_word('CLARK'), 'Clark')
     self.assertEqual(recapitalize_word('GRANROTH-WILDING'),
                      'Granroth-Wilding')
     self.assertEqual(recapitalize_word('Jean-Pierre'), 'Jean-Pierre')
示例#2
0
 def test_recapitalize_word(self):
     self.assertEqual(recapitalize_word('Dupont'), 'Dupont')
     self.assertEqual(recapitalize_word('van'), 'van')
     self.assertEqual(recapitalize_word('CLARK'), 'Clark')
     self.assertEqual(recapitalize_word(
         'GRANROTH-WILDING'), 'Granroth-Wilding')
     self.assertEqual(recapitalize_word('Jean-Pierre'), 'Jean-Pierre')
示例#3
0
 def test_unicode(self):
     self.assertEqual(recapitalize_word('ÉMILIE'), 'Émilie')
     self.assertEqual(recapitalize_word('JOSÉ'), 'José')
示例#4
0
 def test_force(self):
     self.assertEqual(recapitalize_word('jean', True), 'Jean')
示例#5
0
 def test_lower(self):
     self.assertEqual(recapitalize_word('van'), 'van')
     self.assertEqual(recapitalize_word('alphonse'), 'alphonse')
示例#6
0
 def test_unicode(self):
     self.assertEqual(recapitalize_word('ÉMILIE'), 'Émilie')
     self.assertEqual(recapitalize_word('JOSÉ'), 'José')
示例#7
0
 def test_force(self):
     self.assertEqual(recapitalize_word('jean', True), 'Jean')
示例#8
0
 def test_lower(self):
     self.assertEqual(recapitalize_word('van'), 'van')
     self.assertEqual(recapitalize_word('alphonse'), 'alphonse')