def test_returns_blank_for_empty(self): self.assertDictEqual(dict(occurrences("")), {})
def test_missing_element_count_is_0(self): d = occurrences('aaaaa') self.assertEqual(d['c'], 0)
def test_returns_multiset(self): self.assertDictEqual(dict(occurrences('aaaaabbbccc')), {'a': 5, 'b': 3, 'c': 3})
def test_returns_multiset(self): self.assertDictEqual(dict(functional.occurrences("aaaaabbbccc")), {"a": 5, "b": 3, "c": 3})
def test_missing_element_count_is_0(self): d = functional.occurrences("aaaaa") self.assertEqual(d["c"], 0)
def test_returns_blank_for_empty(self): self.assertDictEqual(dict(functional.occurrences("")), {})