Ignore:
Timestamp:
Oct 27, 2017 6:28:17 AM (19 months ago)
Author:
Piotr Rozyczko <piotr.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:
b3e8629
Parents:
9e54199
git-author:
Adam Washington <rprospero@…> (10/27/17 06:28:17)
git-committer:
Piotr Rozyczko <piotr.rozyczko@…> (10/27/17 06:28:17)
Message:

Ess sesans plots (#113)

  • Fix line endings
  • Keep the isSesans parameter when making copies.
  • Draw Sesans data in linear coordinates
  • Add unit test for Sesans Plotting
  • Remove lint
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Plotting/UnitTesting/PlotterTest.py

    rb2a5042 r749b715  
    7373 
    7474        self.assertEqual(self.plotter.ax.get_yscale(), 'log') 
     75        self.assertTrue(FigureCanvas.draw.called) 
     76 
     77    def testPlotWithSesans(self): 
     78        """ Ensure that Sesans data is plotted in linear cooredinates""" 
     79        data = Data1D(x=[1.0, 2.0, 3.0], 
     80                      y=[10.0, 11.0, 12.0], 
     81                      dx=[0.1, 0.2, 0.3], 
     82                      dy=[0.1, 0.2, 0.3]) 
     83        data.title = "Sesans data" 
     84        data.name = "Test Sesans" 
     85        data.isSesans = True 
     86        data.id = 2 
     87 
     88        self.plotter.data = data 
     89        self.plotter.show() 
     90        FigureCanvas.draw = MagicMock() 
     91 
     92        self.plotter.plot(hide_error=True) 
     93 
     94        self.assertEqual(self.plotter.ax.get_xscale(), 'linear') 
     95        self.assertEqual(self.plotter.ax.get_yscale(), 'linear') 
    7596        self.assertTrue(FigureCanvas.draw.called) 
    7697 
Note: See TracChangeset for help on using the changeset viewer.