def test_empty(): counts = count_chars('') assert counts == {}
def test_common(): counts = count_chars('abbcccddddeeeee') assert counts == {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5}
def test_wrong_type(): with pytest.raises(TypeError): count_chars(42)
def test_common(): counts = count_chars('aabccc') assert counts == {'a': 2, 'b': 1, 'c': 3}
def test_empty(): assert count_chars('aabbb') == {'a': 2, 'b': 3}
def test_empty(): assert count_chars("") == {}
def test_single_char(): counts = count_chars('a') assert counts == {'a': 1}
def test_default(): assert count_chars("hi") == {"h": 1, "i": 1}
def test_digits(): assert count_chars("hello1231") == { "h": 1, "e": 1, "l": 2, "o": 1, "1": 2, "2": 1, "3": 1 }
def test_many_letters(): assert count_chars('ddddddddd') == {'d': 9}
def test_wrong_type_list(): with pytest.raises(TypeError): count_chars(['g', 'd', 's'])
def test_count_chars(): assert count_chars('mnnp') == {'m': 1, 'n': 2, 'p': 1}