Beispiel #1
0
 def test_list_data(self):
     data = nml.variables(self.list_text)
     truth = {"off_files": "'a.nc' 'b.nc' 'c.nc'"}
     self.assertDictEqual(data, truth)
Beispiel #2
0
 def test_negative_numeric_data(self):
     data = nml.variables(self.neg_numeric_text)
     truth = {"nn_off_idx": "-1 -2 -3"}
     self.assertDictEqual(data, truth)
Beispiel #3
0
 def test_string_data(self):
     data = nml.variables(self.string_text)
     truth = {"contact": '"*****@*****.**"'}
     self.assertDictEqual(data, truth)
Beispiel #4
0
 def test_nospace_data(self):
     data = nml.variables(self.nospace_text)
     truth = {"nn_off_idx": "1 2 3"}
     self.assertDictEqual(data, truth)
Beispiel #5
0
 def test_logical_data(self):
     data = nml.variables(self.logic_text)
     truth = {"ln_test": ".TRUE."}
     self.assertDictEqual(data, truth)
Beispiel #6
0
 def test_comment_data(self):
     data = nml.variables(self.comment_text)
     truth = {}
     self.assertDictEqual(data, truth)
Beispiel #7
0
 def test_mix_data(self):
     data = nml.variables(self.mix_text)
     truth = {"nn_off_idx": "1 2 3", "off_files": "'a.nc' 'b.nc' 'c.nc'"}
     self.assertDictEqual(data, truth)
Beispiel #8
0
 def test_should_handle_footer(self):
     data = nml.variables(self.no_trail_text)
     truth = {"nn_off_idx": "1 2 3", "off_files": "'a.nc' 'b.nc' 'c.nc'"}
     self.assertDictEqual(data, truth)