def testToCamelCaseUnicode(self): data = [u'höt fläming cäts', u'HötFlämingCäts', u'hötFlämingCäts', u'höt_fläming_cäts', u'Höt Fläming _ Cäts'] expected = [u'HötFlämingCäts', u'HötFlämingCäts', u'HötFlämingCäts', u'HötFlämingCäts', u'HötFlämingCäts'] for i, sample in enumerate(data): result = TextFX.to_camelcase(sample) self.assertEqual(result, expected[i]) self.assertEqual(u'hôtFlâmíngCåts', TextFX.to_camelcase(u'hôt_Flâmíng __ Cåts', capitalize=False))
def testToCamelCase(self): data = ['hot flaming cats', 'HotFlamingCats', 'hotFlamingCats', 'hot_flaming_cats', 'Hot Flaming _ Cats', 'Hot_Flaming __ Cats'] expected = ['HotFlamingCats', 'HotFlamingCats', 'HotFlamingCats', 'HotFlamingCats', 'HotFlamingCats', 'HotFlamingCats'] for i, sample in enumerate(data): result = TextFX.to_camelcase(sample) self.assertEqual(result, expected[i])