Exemplo n.º 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)        
Exemplo n.º 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)
Exemplo n.º 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)  
Exemplo n.º 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)
Exemplo n.º 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)           
Exemplo n.º 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)
Exemplo n.º 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    
Exemplo n.º 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