def test_maxes_simple_no_key(values, ref, iter_type): """ Test that :func:`utils.maxes` works in the simplest case. """ assert utils.maxes(iter_type(values)) == ref
def test_maxes_key(values, ref, iter_type): """ Test that :func:`utils.maxes` works when provided with a key. """ assert utils.maxes(iter_type(values), key=lambda x: -x) == ref