def test_no_phenomenon(self):
     original_metadata = deepcopy(self.metadata)
     self.phenom_lookup_patch.return_value = None
     result = translate_phenomenon(self.metadata,
                                   None,
                                   None,
                                   None,
                                   probability=self.probability)
     self.assertEqual(self.metadata, original_metadata)
Ejemplo n.º 2
0
 def test_basic(self):
     result = translate_phenomenon(self.metadata, None, None, None,
                                   probability=self.probability)
     # Check metadata.
     thresh_coord = DimCoord([22.0],
                             standard_name='air_temperature',
                             long_name='', units='K')
     self.assertEqual(self.metadata, {
         'standard_name': None,
         'long_name': 'probability_of_air_temperature_<prob_type>',
         'units': Unit(1),
         'aux_coords_and_dims': [(thresh_coord, None)]})
 def test_basic(self):
     result = translate_phenomenon(self.metadata,
                                   None,
                                   None,
                                   None,
                                   probability=self.probability)
     # Check metadata.
     thresh_coord = DimCoord([22.0],
                             standard_name='air_temperature',
                             long_name='',
                             units='K')
     self.assertEqual(
         self.metadata, {
             'standard_name': None,
             'long_name': 'probability_of_air_temperature_<prob_type>',
             'units': Unit(1),
             'aux_coords_and_dims': [(thresh_coord, None)]
         })
Ejemplo n.º 4
0
 def test_no_phenomenon(self):
     original_metadata = deepcopy(self.metadata)
     self.phenom_lookup_patch.return_value = None
     result = translate_phenomenon(self.metadata, None, None, None,
                                   probability=self.probability)
     self.assertEqual(self.metadata, original_metadata)