def test_cmf_is_valid(): ''' Tests if a cmf returns as valid data. ''' obs = colorimetry.prepare_cmf() assert 'X' in obs assert 'Y' in obs assert 'Z' in obs assert 'wvl' in obs assert len(obs['X']) == len(obs['Y']) == len(obs['Z']) == len(obs['wvl'])
def test_prepare_cmf_throws_for_bad_choices(): with pytest.raises(ValueError): colorimetry.prepare_cmf('asdf')
def test_can_prepare_cmf_1964_10deg(): ''' Trusts observer is properly formed. ''' obs = colorimetry.prepare_cmf('1964_10deg') assert obs