示例#1
0
    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)        
示例#2
0
    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)
示例#3
0
    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)  
示例#4
0
    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)
示例#5
0
    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)           
示例#6
0
    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)
示例#7
0
    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    
示例#8
0
    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