def test_valuecount():

    table = (('foo', 'bar'), ('a', 1), ('b', 2), ('b', 7))
    n, f = valuecount(table, 'foo', 'b')
    eq_(2, n)
    eq_(2./3, f)
dataset/ETHPy150Open alimanfoo/petl/petl/test/util/test_counting.py/test_valuecount/original