def test_get_clw_fix(): """Test getting of fix.""" fix = Fix.get_fixes('CMIP6', 'HadGEM3-GC31-LL', 'Amon', 'clw') assert fix == [Clw(None), AllVars(None)]
def test_get_fix_mip_and_var(self): self.assertListEqual(Fix.get_fixes('CMIP6', 'CESM2', 'Omon', 'tos'), [Tos(None), Omon(None)])
def test_get_allvars_fix(): fix = Fix.get_fixes('CMIP6', 'MCM-UA-1-0', 'Amon', 'arbitrary_var_name_and_wrong_lon_bnds') assert fix == [AllVars(None)]
def test_get_fix_no_model(self): self.assertListEqual( Fix.get_fixes('CMIP5', 'BAD_MODEL', 'Amon', 'ch4'), [])
def test_get_fix_only_mip(self): self.assertListEqual(Fix.get_fixes('CMIP6', 'CESM2', 'Omon', 'thetao'), [Omon(None)])
def test_get_fix_case_insensitive(self): self.assertListEqual( Fix.get_fixes('CMIP5', 'CanESM2', 'Amon', 'fgCo2'), [FgCo2(None)])
def test_get_fixes_with_generic(self): self.assertListEqual( Fix.get_fixes('CMIP5', 'CESM1-BGC', 'Amon', 'gpp'), [Gpp(None)])
def test_get(self): """Test fix get.""" self.assertListEqual( Fix.get_fixes('CMIP5', 'HADGEM2-ES', 'Amon', 'o2'), [O2(None), AllVars(None)])
def test_get_cl_fix(): """Test getting of fix.""" fix = Fix.get_fixes('CMIP5', 'HadGEM2-ES', 'Amon', 'cl') assert fix == [Cl(None), AllVars(None)]
def test_get_clw_fix(): """Test getting of fix.""" fix = Fix.get_fixes('CMIP6', 'CESM2', 'Amon', 'clw') assert fix == [Clw(None)]
def test_get_tas_fix(): """Test getting of fix.""" fix = Fix.get_fixes('CMIP6', 'CESM2', 'Amon', 'tas') assert fix == [Tas(None)]
def test_get(self): """Test fix get""" self.assertListEqual( Fix.get_fixes('CMIP5', 'CNRM-CM5', 'Amon', 'msftmyzba'), [Msftmyzba(None)])
def test_get(self): """Test fix get""" self.assertListEqual(Fix.get_fixes('CMIP5', 'FIO-ESM', 'co2'), [Co2()])
def test_get(self): """Test fix get.""" self.assertListEqual( Fix.get_fixes('CMIP6', 'EC-Earth3', 'SImon', 'siconca'), [Siconca(None)])
def test_get(self): """Test fix get""" self.assertListEqual(Fix.get_fixes('CMIP5', 'CANESM2', 'fgco2'), [FgCo2()])
def test_get_thetao_fix(): """Test getting of fix.""" fix = Fix.get_fixes('CMIP6', 'MCM-UA-1-0', 'Omon', 'thetao') assert fix == [Omon(None), AllVars(None)]
def test_get_fix(self): self.assertListEqual( Fix.get_fixes('CMIP5', 'CanESM2', 'Amon', 'fgco2'), [FgCo2(None)])
def test_get(self): """Test fix get""" self.assertListEqual(Fix.get_fixes('CMIP5', 'MIROC5', 'sftof'), [Sftof()])
def test_get_fixes_with_replace(self): self.assertListEqual(Fix.get_fixes('CMIP5', 'BNU-ESM', 'Amon', 'ch4'), [Ch4(None)])
def test_get(self): """Test fix get""" self.assertListEqual(Fix.get_fixes('CMIP5', 'MIROC5', 'tas'), [Tas()])
def test_get_fix_no_project(self): with pytest.raises(KeyError): Fix.get_fixes('BAD_PROJECT', 'BNU-ESM', 'Amon', 'ch4')
def test_get_cl_fix(): """Test getting of fix.""" fix = Fix.get_fixes('CMIP5', 'inmcm4', 'Amon', 'cl') assert fix == [Cl(None)]
def test_get_fix_no_var(self): self.assertListEqual( Fix.get_fixes('CMIP5', 'BNU-ESM', 'Amon', 'BAD_VAR'), [])
def test_get(self): """Test fix get.""" self.assertListEqual(Fix.get_fixes('CMIP5', 'INMCM4', 'Amon', 'nbp'), [Nbp(None)])
def test_get_fix_only_mip_case_insensitive(self): self.assertListEqual(Fix.get_fixes('CMIP6', 'CESM2', 'omOn', 'thetao'), [Omon(None)])
def test_get_cl_fix(): """Test getting of fix.""" fix = Fix.get_fixes('CMIP6', 'GFDL-CM4', 'Amon', 'cl') assert fix == [Cl(None)]
def test_get_cl_fix(): """Test getting of fix.""" fix = Fix.get_fixes('CMIP6', 'MPI-ESM1-2-LR', 'Amon', 'cl') assert fix == [Cl(None)]
def test_get_siconc_fix(): """Test getting of fix.""" fix = Fix.get_fixes('CMIP6', 'NorESM2-LM', 'SImon', 'siconc') assert fix == [Siconc(None)]
def test_get_tas_fix(): fix = Fix.get_fixes('CMIP6', 'MCM-UA-1-0', 'Amon', 'tas') assert fix == [Tas(None), AllVars(None)]
def test_get_tas_fix(): fix = Fix.get_fixes('CMIP6', 'HadGEM3-GC31-LL', 'Amon', 'tas') assert fix == [AllVars(None)]