def test_set_param_string(self): file = ParamFile() file.add_section("global") file.set_string("data", "bar") self.assertEquals("bar", file.get_string("data"))
def test_get_section(self): file = ParamFile() self.assertEquals(None, file.get_section("unknown")) self.assertRaises(KeyError, lambda: file["unknown"])
def test_add_section(self): file = ParamFile() file.add_section("global") self.assertTrue(file["global"] is not None)
def test_init(self): file = ParamFile() self.assertTrue(file is not None)