def test_int_bool_envvars_have_ensurers(): bool_ints = [ type(envvar) in [bool, int] for envvar in DEFAULT_VALUES.values() ] key_mask = set(itertools.compress(DEFAULT_VALUES.keys(), bool_ints)) ensurer_keys = set(DEFAULT_ENSURERS.keys()) assert len(key_mask.intersection(ensurer_keys)) == len(key_mask)
def test_int_bool_envvars_have_ensurers(): bool_ints = [type(envvar) in [bool, int] for envvar in DEFAULT_VALUES.values()] key_mask = set(itertools.compress(DEFAULT_VALUES.keys(), bool_ints)) ensurer_keys = set(DEFAULT_ENSURERS.keys()) assert len(key_mask.intersection(ensurer_keys)) == len(key_mask)