Exemple #1
0
 def test_no_hyphen(self):
     # CF explicitly prohibits hyphen, even though it is fine in NetCDF.
     self.assertEqual(Saver.cf_valid_var_name('valid-netcdf'),
                      'valid_netcdf')
Exemple #2
0
 def test_leading_number(self):
     self.assertEqual(Saver.cf_valid_var_name('2invalid'), 'var_2invalid')
Exemple #3
0
 def test_leading_invalid(self):
     self.assertEqual(Saver.cf_valid_var_name('?invalid'), 'var__invalid')
Exemple #4
0
 def test_special_chars(self):
     self.assertEqual(Saver.cf_valid_var_name('inv?alid'), 'inv_alid')
Exemple #5
0
 def test_leading_underscore(self):
     self.assertEqual(Saver.cf_valid_var_name('_invalid'), 'var__invalid')
Exemple #6
0
 def test_leading_invalid(self):
     self.assertEqual(Saver.cf_valid_var_name("?invalid"), "var__invalid")
Exemple #7
0
 def test_no_replacement(self):
     self.assertEqual(Saver.cf_valid_var_name('valid_Nam3'), 'valid_Nam3')
Exemple #8
0
 def test_no_hyphen(self):
     # CF explicitly prohibits hyphen, even though it is fine in NetCDF.
     self.assertEqual(Saver.cf_valid_var_name('valid-netcdf'),
                      'valid_netcdf')
Exemple #9
0
 def test_leading_number(self):
     self.assertEqual(Saver.cf_valid_var_name("2invalid"), "var_2invalid")
Exemple #10
0
 def test_leading_invalid(self):
     self.assertEqual(Saver.cf_valid_var_name('?invalid'),
                      'var__invalid')
Exemple #11
0
 def test_leading_number(self):
     self.assertEqual(Saver.cf_valid_var_name('2invalid'),
                      'var_2invalid')
Exemple #12
0
 def test_leading_underscore(self):
     self.assertEqual(Saver.cf_valid_var_name('_invalid'),
                      'var__invalid')
Exemple #13
0
 def test_special_chars(self):
     self.assertEqual(Saver.cf_valid_var_name('inv?alid'),
                      'inv_alid')
Exemple #14
0
 def test_no_replacement(self):
     self.assertEqual(Saver.cf_valid_var_name('valid_Nam3'),
                      'valid_Nam3')