def test_problem_with_plots(self): model_run = 'edr' defaults = { 'climatology': True, } plots = {} delete = { 'del_fldmeanfiles': False, } obsroot = './' cmiproot = './' experiment = 'historical' obs = {} with pytest.raises(TypeError): ch.check_inputs(plots, model_run, experiment, obsroot, cmiproot, obs, defaults, delete)
def test_problem_with_delete(self): model_run = 'edr' defaults = { 'climatology': True, } plots = [ { 'variable': 'ta', 'plot_projection': 'time_series', }, ] delete = [] obsroot = './' cmiproot = './' experiment = 'historical' obs = {} with pytest.raises(TypeError): ch.check_inputs(plots, model_run, experiment, obsroot, cmiproot, obs, defaults, delete)
def test_problem_with_experiment(self): model_run = 'edr' defaults = { 'climatology': True, } plots = [ { 'variable': 'ta', 'plot_projection': 'time_series', }, ] delete = { 'del_fldmeanfiles': False, } obsroot = None cmiproot = None experiment = 1 obs = {} with pytest.raises(TypeError): ch.check_inputs(plots, model_run, experiment, obsroot, cmiproot, obs, defaults, delete)
def test_valid_input(self): model_run = 'edr' defaults = { 'climatology': True, } plots = [ { 'variable': 'ta', 'plot_projection': 'time_series', }, ] delete = { 'del_fldmeanfiles': False, } obsroot = None cmiproot = './' experiment = 'historical' obs = {} assert ch.check_inputs(plots, model_run, experiment, obsroot, cmiproot, obs, defaults, delete) == None