示例#1
0
 def test_same_letters(self):
     self.assertEqual(count_letters("a"), {"a": 1})
     self.assertEqual(count_letters("aa"), {"a": 2})
示例#2
0
 def test_distinct_letters(self):
     self.assertEqual(count_letters("ab"), {"a": 1, "b"})
示例#3
0
 def test_if_exists(self):
     self.assertEqual(count_letters(""), {})
示例#4
0
 def test_different_letters(self):
     self.assertEqual(count_letters("b"), {"b": 1})