Changeset f7d14a1 in sasview for src


Ignore:
Timestamp:
Oct 25, 2017 4:23:01 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
dc57b4f, 02f1d12, fca1f50
Parents:
d3475fe
Message:

Fixed failing unit tests

Location:
src/sas
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/sas/_config.py

    r88e1f57 rf7d14a1  
    110110        try: 
    111111            module = load_module_from_path('sas.custom_config', path) 
    112             logger.info("GuiManager loaded %s", path) 
     112            #logger.info("GuiManager loaded %s", path) 
    113113            return module 
    114114        except Exception as exc: 
  • src/sas/qtgui/MainWindow/UnitTesting/DataExplorerTest.py

    rd3475fe rf7d14a1  
    3737            def allowBatch(self): 
    3838                return False 
    39             def setData(self, data_item=None): 
     39            def setData(self, data_item=None, is_batch=False): 
    4040                return None 
    4141            def title(self): 
     
    170170 
    171171        # Populate the model 
    172         filename = ["cyl_400_20.txt", "P123_D2O_10_percent.dat", "cyl_400_20.txt"] 
     172        filename = ["cyl_400_20.txt", "cyl_400_20.txt", "cyl_400_20.txt"] 
    173173        self.form.readData(filename) 
    174174 
  • src/sas/qtgui/Perspectives/Fitting/FittingWidget.py

    rd3475fe rf7d14a1  
    146146    def data(self, value): 
    147147        """ data setter """ 
     148        # Value is either a list of indices for batch fitting or a simple index 
     149        # for standard fitting. Assure we have a list, regardless. 
    148150        if isinstance(value, list): 
    149151            self.is_batch_fitting = True 
     
    159161 
    160162        # Update logics with data items 
     163        # Logics.data contains only a single Data1D/Data2D object 
    161164        self.logic.data = GuiUtils.dataFromItem(value[0]) 
    162165 
     
    164167        self.is2D = True if isinstance(self.logic.data, Data2D) else False 
    165168 
     169        # Let others know we're full of data now 
    166170        self.data_is_loaded = True 
    167171 
     
    357361 
    358362        # Reload the model 
    359         self.onSelectModel() 
     363        self.onSelectModel() 
    360364 
    361365        # Smearing tab 
  • src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py

    r7ace296 rf7d14a1  
    100100        delegate = fittingWindow.lstPoly.itemDelegate() 
    101101        self.assertEqual(len(delegate.POLYDISPERSE_FUNCTIONS), 5) 
    102         self.assertEqual(delegate.editableParameters(), [1, 2, 3, 4, 5]) 
     102        self.assertEqual(delegate.editableParameters(), [2, 3, 4, 5]) 
    103103        self.assertEqual(delegate.poly_function, 6) 
    104104        self.assertIsInstance(delegate.combo_updated, QtCore.pyqtBoundSignal) 
     
    629629        updateModelItem(item, [test_data], "test") 
    630630        # Force same data into logic 
    631         self.widget.logic.data = item 
     631        self.widget.data = item 
    632632        category_index = self.widget.cbCategory.findText("Sphere") 
    633633        self.widget.cbCategory.setCurrentIndex(category_index) 
     
    678678        updateModelItem(item, [test_data], "test") 
    679679        # Force same data into logic 
    680         self.widget.logic.data = item 
     680        self.widget.data = item 
    681681        category_index = self.widget.cbCategory.findText("Sphere") 
    682682        self.widget.cbCategory.setCurrentIndex(category_index) 
Note: See TracChangeset for help on using the changeset viewer.