Ignore:
Timestamp:
Oct 24, 2017 2:44:26 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:
fca1f50, d6b234b
Parents:
16afe01 (diff), 5582b078 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into ESS_GUI

Location:
src/sas/qtgui/MainWindow/UnitTesting
Files:
6 added
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/MainWindow/UnitTesting/DataExplorerTest.py

    r464cd07 rf4a1433  
    2525import sas.qtgui.Plotting.PlotHelper as PlotHelper 
    2626 
    27 if not QApplication.instance(): 
    28     app = QApplication(sys.argv) 
     27#if not QApplication.instance(): 
     28app = QApplication(sys.argv) 
    2929 
    3030class DataExplorerTest(unittest.TestCase): 
     
    150150 
    151151        # Populate the model 
    152         filename = ["cyl_400_20.txt", "Dec07031.ASC", "cyl_400_20.txt"] 
     152        filename = ["cyl_400_20.txt", "P123_D2O_10_percent.dat", "cyl_400_20.txt"] 
    153153        self.form.readData(filename) 
    154154 
     
    170170 
    171171        # Populate the model 
    172         filename = ["cyl_400_20.txt", "Dec07031.ASC", "cyl_400_20.txt"] 
     172        #filename = ["cyl_400_20.txt", "P123_D2O_10_percent.dat", "cyl_400_20.txt"] 
     173        filename = ["cyl_400_20.txt", "cyl_400_20.txt", "P123_D2O_10_percent.dat"] 
    173174        self.form.readData(filename) 
     175 
     176        self.form.show() 
     177        app.exec_() 
    174178 
    175179        # Assure the model contains three items 
     
    319323        """ 
    320324        # Populate the model with 1d and 2d data 
    321         filename = ["cyl_400_20.txt", "Dec07031.ASC"] 
     325        filename = ["cyl_400_20.txt", "P123_D2O_10_percent.dat"] 
    322326        self.form.readData(filename) 
    323327 
     
    469473 
    470474        defaults = 'All (*.*);;canSAS files (*.xml);;SESANS files' +\ 
    471             ' (*.ses);;ASCII files (*.txt);;IGOR 2D files (*.asc);;' +\ 
     475            ' (*.ses);;ASCII files (*.txt);;' +\ 
    472476            'IGOR/DAT 2D Q_map files (*.dat);;IGOR 1D files (*.abs);;'+\ 
    473             'HFIR 1D files (*.d1d);;DANSE files (*.sans);;NXS files (*.nxs)' 
     477            'DANSE files (*.sans)' 
    474478        default_list = defaults.split(';;') 
    475479 
     
    525529        p_file="cyl_400_20.txt" 
    526530        output_object = loader.load(p_file) 
    527         new_data = [manager.create_gui_data(output_object, p_file)] 
     531        new_data = [manager.create_gui_data(output_object[0], p_file)] 
    528532 
    529533        # Mask retrieval of the data 
     
    556560 
    557561        # get Data2D 
    558         p_file="Dec07031.ASC" 
     562        p_file="P123_D2O_10_percent.dat" 
    559563        output_object = loader.load(p_file) 
    560         new_data = [manager.create_gui_data(output_object, p_file)] 
     564        new_data = [manager.create_gui_data(output_object[0], p_file)] 
    561565 
    562566        # Mask retrieval of the data 
     
    594598        output_object = loader.load(p_file) 
    595599        output_item = QtGui.QStandardItem() 
    596         new_data = [(output_item, manager.create_gui_data(output_object, p_file))] 
     600        new_data = [(output_item, manager.create_gui_data(output_object[0], p_file))] 
    597601 
    598602        # Mask plotting 
     
    737741 
    738742        # get Data2D 
    739         p_file=["Dec07031.ASC"] 
     743        p_file=["P123_D2O_10_percent.dat"] 
    740744        # Read in the file 
    741745        output, message = self.form.readData(p_file) 
     
    754758        QFileDialog.getSaveFileName.assert_called_with( 
    755759                                caption="Save As", 
    756                                 directory='Dec07031_out.dat', 
     760                                directory='P123_D2O_10_percent_out.dat', 
    757761                                filter='IGOR/DAT 2D file in Q_map (*.dat)', 
    758762                                parent=None) 
     
    782786        """ 
    783787        # get Data1D 
    784         p_file=["Dec07031.ASC"] 
     788        p_file=["P123_D2O_10_percent.dat"] 
    785789        # Read in the file 
    786790        output, message = self.form.readData(p_file) 
Note: See TracChangeset for help on using the changeset viewer.