def qc_curve_group_well(well, tests, keys=None, alias=None):
    """
    Run tests on a cohort of curves.

    Args:
        well (welly.well.Well): Well object.
        tests (dict): a dictionary of tests, mapping mnemonics to lists of
            tests. Two special keys, `all` and `each` map tests to the set
            of all curves, and to each curve in the well, respectively.
            You only need `all` if the test involves multiple inputs, e.g.
            comparing one curve to another. See example in tests/test_quality.py
        keys (list): a list of the mnemonics to run the tests against.
        alias (dict): an alias dictionary, mapping mnemonics to lists of
            mnemonics. e.g. {'density': ['DEN', 'DENS']}

    Returns:
        dict. Test results for all the curves.
            {curve_name0: {test0: test_result0, ...}, ...}
    """
    keys = well._get_curve_mnemonics(keys, alias=alias)

    if not keys:
        return {}

    all_tests = tests.get('all', tests.get('All', tests.get('ALL', [])))
    data = {test.__name__: test(well, keys, alias) for test in all_tests}

    results = {}
    for i, key in enumerate(keys):
        this = {}
        for test, result in data.items():
            this[test] = result[i]
        results[key] = this
    return results