Ejemplo n.º 1
0
 def test_set_param_string(self):
     file = ParamFile()
     file.add_section("global")
     file.set_string("data", "bar")
     self.assertEquals("bar", file.get_string("data"))
Ejemplo n.º 2
0
 def test_get_section(self):
     file = ParamFile()
     self.assertEquals(None, file.get_section("unknown"))
     self.assertRaises(KeyError, lambda: file["unknown"])
Ejemplo n.º 3
0
 def test_add_section(self):
     file = ParamFile()
     file.add_section("global")
     self.assertTrue(file["global"] is not None)
Ejemplo n.º 4
0
 def test_get_section(self):
     file = ParamFile()
     self.assertEquals(None, file.get_section("unknown"))
     self.assertRaises(KeyError, lambda: file["unknown"])
Ejemplo n.º 5
0
 def test_set_param_string(self):
     file = ParamFile()
     file.add_section("global")
     file.set_string("data", "bar")
     self.assertEquals("bar", file.get_string("data"))
Ejemplo n.º 6
0
 def test_add_section(self):
     file = ParamFile()
     file.add_section("global")
     self.assertTrue(file["global"] is not None)
Ejemplo n.º 7
0
 def test_init(self):
     file = ParamFile()
     self.assertTrue(file is not None)