Exemplo n.º 1
0
 def test_get_enabled_1d_contour_qptl(self):
     cube = tcl.setup_1d_cube()
     dim_1_name = 'time'
     dim_2_name = None
     status = {'cube loaded': True,
               'plot method': 'using quickplot',
               'plot type': 'Contour',
               'cube': cube,
               'dim 1 name': dim_1_name,
               'dim 2 name': dim_2_name,
               'projection': 'Automatic'}
     state = gl.get_enabled(status)
     expected_state = {'previous': False,
                       'next': False,
                       'source code': True,
                       'cartographic': False,
                       'labels': False,
                       'colorbar': False,
                       'plot type': False,
                       'colormap': False,
                       'contour slider': False,
                       'third dim': False,
                       'central longitude': False,
                       'update': True}
     difference = compare_dict(state, expected_state)
     self.assertIsNone(difference)
Exemplo n.º 2
0
 def test_get_enabled_1d_contour_qptl(self):
     cube = tcl.setup_1d_cube()
     dim_1_name = 'time'
     dim_2_name = None
     status = {
         'cube loaded': True,
         'plot method': 'using quickplot',
         'plot type': 'Contour',
         'cube': cube,
         'dim 1 name': dim_1_name,
         'dim 2 name': dim_2_name,
         'projection': 'Automatic'
     }
     state = gl.get_enabled(status)
     expected_state = {
         'previous': False,
         'next': False,
         'source code': True,
         'cartographic': False,
         'labels': False,
         'colorbar': False,
         'plot type': False,
         'colormap': False,
         'contour slider': False,
         'third dim': False,
         'central longitude': False,
         'update': True
     }
     difference = compare_dict(state, expected_state)
     self.assertIsNone(difference)
Exemplo n.º 3
0
 def test_get_dim_names_1d(self):
     cube = tcl.setup_1d_cube()
     names = gl.get_dim_names(cube)
     self.assertEqual(names, ["time"])
Exemplo n.º 4
0
 def test_get_dim_names_1d(self):
     cube = tcl.setup_1d_cube()
     names = gl.get_dim_names(cube)
     self.assertEqual(names, ["time"])