def test_list_data(self): data = nml.variables(self.list_text) truth = {"off_files": "'a.nc' 'b.nc' 'c.nc'"} self.assertDictEqual(data, truth)
def test_negative_numeric_data(self): data = nml.variables(self.neg_numeric_text) truth = {"nn_off_idx": "-1 -2 -3"} self.assertDictEqual(data, truth)
def test_string_data(self): data = nml.variables(self.string_text) truth = {"contact": '"*****@*****.**"'} self.assertDictEqual(data, truth)
def test_nospace_data(self): data = nml.variables(self.nospace_text) truth = {"nn_off_idx": "1 2 3"} self.assertDictEqual(data, truth)
def test_logical_data(self): data = nml.variables(self.logic_text) truth = {"ln_test": ".TRUE."} self.assertDictEqual(data, truth)
def test_comment_data(self): data = nml.variables(self.comment_text) truth = {} self.assertDictEqual(data, truth)
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)
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)