Beispiel #1
0
 def test_has_variable_attribute_with_valid_attribute(self):
     self.assertTrue(
         cmor.has_variable_attribute(self.variable_id, 'valid_attribute'))
Beispiel #2
0
 def test_has_variable_attribute_with_invalid_attribute(self):
     self.assertFalse(
         cmor.has_variable_attribute(self.variable_id, 'invalid_attribute'))
 def test_set_variable_attribute_with_right_type(self):
     cmor.set_variable_attribute(self.variable_id, 'float_attribute', 'f',
                                 1.0)
     self.assertTrue(
         cmor.has_variable_attribute(self.variable_id, 'float_attribute'))
 def test_set_variable_attribute_with_different_type(self):
     cmor.set_variable_attribute(self.variable_id, 'double_attribute', 'd',
                                 12.34)
     self.assertTrue(
         cmor.has_variable_attribute(self.variable_id, 'double_attribute'))
 def test_set_variable_attribute_with_int_type(self):
     cmor.set_variable_attribute(self.variable_id, 'int_attribute', 'i',
                                 1134)
     self.assertTrue(
         cmor.has_variable_attribute(self.variable_id, 'int_attribute'))
 def test_set_variable_attribute_with_long_type(self):
     cmor.set_variable_attribute(self.variable_id, 'long_attribute', 'l',
                                 1234)
     self.assertTrue(
         cmor.has_variable_attribute(self.variable_id, 'long_attribute'))
 def test_set_variable_attribute_with_string_type(self):
     cmor.set_variable_attribute(self.variable_id, 'myStringAttr', 'c',
                                 'valid_value')
     self.assertTrue(
         cmor.has_variable_attribute(self.variable_id, 'myStringAttr'))
 def test_has_variable_attribute_with_invalid_attribute(self):
     self.assertFalse(cmor.has_variable_attribute(self.variable_id,
                                                  'invalid_attribute'))
 def test_has_variable_attribute_with_valid_attribute(self):
     self.assertTrue(cmor.has_variable_attribute(self.variable_id,
                                                 'valid_attribute'))