Changeset 497e06d in sasview
- Timestamp:
- Oct 19, 2017 10:52:39 AM (7 years ago)
- Branches:
- unittest-saveload
- Children:
- add6365
- Parents:
- 8225f33
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/projectsaveandload/test/utest_project.py
r8225f33 r497e06d 6 6 import sys 7 7 import unittest 8 import logging9 8 import warnings 10 9 if sys.version_info[0] >= 3: … … 13 12 from StringIO import StringIO 14 13 15 from sas.sasview.sasview import SasView16 14 from sas.sascalc.dataloader.loader import Loader 17 from sas.sascalc.fit.pagestate import PageState 18 from sas.sasgui.perspectives.fitting.fitpage import FitPage 15 from sas.sascalc.fit.pagestate import Reader as fit_state_reader 16 from sas.sasgui.perspectives.invariant.invariant_state import Reader as invariant_reader 17 from sas.sasgui.perspectives.pr.inversion_state import Reader as pr_reader 18 from sas.sasgui.perspectives.corfunc.corfunc_state import Reader as corfunc_reader 19 19 20 logger = logging.getLogger(__name__)21 20 warnings.simplefilter("ignore") 22 21 23 22 TEMP_FOLDER = "temp_folder" 23 STATE_LOADERS = [fit_state_reader, invariant_reader, pr_reader, corfunc_reader] 24 24 25 25 … … 30 30 Set up the base unit test class and variables used throughout the tests 31 31 """ 32 self.addCleanup(self.remove_dir) 32 33 self.loader = Loader() 33 34 self.data1d = self.loader.load("test_data/data1D.h5") … … 35 36 if not (os.path.isdir(TEMP_FOLDER)): 36 37 os.makedirs(TEMP_FOLDER) 37 self.gui = SasView()38 38 39 def addCleanUp(self): 40 """ 41 Close any open files, close any open GUI elements, and remove temp files 42 """ 39 def remove_dir(self): 43 40 if(os.path.isdir(TEMP_FOLDER)): 44 41 os.removedirs(TEMP_FOLDER) 45 self.gui.gui.Close()46 42 47 43 def test_saveload_data1d_fitting_only(self): … … 49 45 Test saving and loading a project with a single data set sent to fitting 50 46 """ 51 #fitpage.fill_data_combobox([self.data1d]) 52 #fitpage.categorybox.SetSelection(4) 53 #fitpage.formfactorbox.SetSelection(6) 47 self.assertTrue(1 == 1) 54 48 55 49 # TODO: Send 1D to fitting, select model, save project, load project
Note: See TracChangeset
for help on using the changeset viewer.