def test_circle(self) : changed_ini = dict(self.params_init) changed_ini['a'] = 15 parse_ini.write_params(changed_ini, 'temp.ini', prefix='tt_') read_ini = parse_ini.parse('temp.ini', self.params_init, prefix='tt_', checking = 01) self.assertEqual(read_ini['a'], 15) self.assertEqual(read_ini['b'], 10) os.remove('temp.ini')
def test_circle(self): changed_ini = dict(self.params_init) changed_ini['a'] = 15 parse_ini.write_params(changed_ini, 'temp.ini', prefix='tt_') read_ini = parse_ini.parse('temp.ini', self.params_init, prefix='tt_', checking=01) self.assertEqual(read_ini['a'], 15) self.assertEqual(read_ini['b'], 10) os.remove('temp.ini')
def test_circle(self) : changed_ini = dict(test_ini_dict) changed_ini['a_string'] = 'a different string' changed_ini['a'] = 5 changed_ini['a_list'] = [5,6,7] copy_changed = dict(changed_ini) parse_ini.write_params(changed_ini, 'temp.ini') read_ini = parse_ini.parse('temp.ini', test_ini_dict, checking = 01) os.remove('temp.ini') for key, value in copy_changed.iteritems() : self.assertTrue(read_ini.has_key(key)) self.assertEqual(value, read_ini[key]) self.assertEqual(value, changed_ini[key])
def test_circle(self): changed_ini = dict(test_ini_dict) changed_ini['a_string'] = 'a different string' changed_ini['a'] = 5 changed_ini['a_list'] = [5, 6, 7] copy_changed = dict(changed_ini) parse_ini.write_params(changed_ini, 'temp.ini') read_ini = parse_ini.parse('temp.ini', test_ini_dict, checking=01) os.remove('temp.ini') for key, value in copy_changed.iteritems(): self.assertTrue(read_ini.has_key(key)) self.assertEqual(value, read_ini[key]) self.assertEqual(value, changed_ini[key])