Пример #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"))
Пример #2
0
 def test_get_section(self):
     file = ParamFile()
     self.assertEquals(None, file.get_section("unknown"))
     self.assertRaises(KeyError, lambda: file["unknown"])
Пример #3
0
 def test_add_section(self):
     file = ParamFile()
     file.add_section("global")
     self.assertTrue(file["global"] is not None)
Пример #4
0
 def test_get_section(self):
     file = ParamFile()
     self.assertEquals(None, file.get_section("unknown"))
     self.assertRaises(KeyError, lambda: file["unknown"])
Пример #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"))
Пример #6
0
 def test_add_section(self):
     file = ParamFile()
     file.add_section("global")
     self.assertTrue(file["global"] is not None)
Пример #7
0
 def test_init(self):
     file = ParamFile()
     self.assertTrue(file is not None)