def test_restore(self): eta = TestParameters() eta.fl2 = 2 eta.integer = 6 eta.write_config(CONF, "etagere3", "") eta = TestParameters() eta.read_config(CONF, "etagere3", "") self.assertEqual(eta.fl2, 2.) self.assertEqual(eta.integer, 6)
def test_default(self): eta = TestParameters() eta.write_config(CONF, "etagere2", "") eta = TestParameters() eta.read_config(CONF, "etagere2", "") self.assertEqual(eta.fl2, 1.) self.assertEqual(eta.integer, 5)
# # Copyright © 2009-2010 CEA # Pierre Raybaut # Licensed under the terms of the CECILL License # (see guidata/__init__.py for details) """ DataSetGroup demo DataSet objects may be grouped into DataSetGroup, allowing them to be edited in a single dialog box (with one tab per DataSet object). """ from __future__ import print_function SHOW = True # Show test in GUI-based test launcher from guidata.tests.all_features import TestParameters from guidata.dataset.datatypes import DataSetGroup if __name__ == "__main__": # Create QApplication import guidata _app = guidata.qapplication() e1 = TestParameters("DataSet #1") e2 = TestParameters("DataSet #2") g = DataSetGroup([e1, e2], title='Parameters group') g.edit() print(e1) g.edit()
def test_load(self): eta = TestParameters() eta.read_config(CONF, "TestParameters", "")
def test_save(self): eta = TestParameters() eta.write_config(CONF, "TestParameters", "")