def testSaveListOption3 (self): testlist = [] opt = ListOption (self.config, u"Test", u"savelist", []) opt.value = testlist newconfig = Config (self.path) newopt = ListOption (self.config, u"Test", u"savelist", []) self.assertEqual (newopt.value, [u""]) stringopt = StringOption (self.config, u"Test", u"savelist", "") self.assertEqual (stringopt.value.strip(), u"")
def testSaveListOption9 (self): testlist = [u""] opt = ListOption (self.config, u"Test", u"savelist", [], separator="|") opt.value = testlist newconfig = Config (self.path) newopt = ListOption (self.config, u"Test", u"savelist", [], separator="|") self.assertEqual (newopt.value, testlist) stringopt = StringOption (self.config, u"Test", u"savelist", "") self.assertEqual (stringopt.value.strip(), u"")
def testSaveListOption1 (self): testlist = [u"элемент 1", u"элемент 2", u"элемент 3"] opt = ListOption (self.config, u"Test", u"savelist", []) opt.value = testlist newconfig = Config (self.path) newopt = ListOption (self.config, u"Test", u"savelist", []) self.assertEqual (newopt.value, testlist) stringopt = StringOption (self.config, u"Test", u"savelist", "") self.assertEqual (stringopt.value.strip(), u"элемент 1;элемент 2;элемент 3")