def test_happy_path(self): cc = CharCounter('Ichiko Tanabe') self.assertEqual(13, cc.count_chars())
def test_double_byte_char(self): cc = CharCounter(u"市") self.assertEqual(1, cc.count_chars())
def test_1_char(self): cc = CharCounter('') self.assertEqual(0, cc.count_chars())
def test_non_ascii_western_char(self): cc = CharCounter(u"á") self.assertEqual(1, cc.count_chars())
def test_1_space(self): cc = CharCounter(' ') self.assertEqual(1, cc.count_chars())