source: sasview/src/sas/qtgui/GUITests.py @ 67642f7

ESS_GUIESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalc
Last change on this file since 67642f7 was d0528c4, checked in by Torin Cooper-Bennun <torin.cooper-bennun@…>, 6 years ago

corrections to GUITests doc

  • Property mode set to 100644
File size: 7.4 KB
RevLine 
[06b0138]1import unittest
[464cd07]2import sys
[4992ff2]3from PyQt5 import QtGui
4from PyQt5 import QtWidgets
[464cd07]5
[32f6cdd]6"""
7Unit tests for the QT GUI
8=========================
9
10In order to run the tests, first install SasView and sasmodels to site-packages
[d0528c4]11by running ``python setup.py install`` in both repositories.
[32f6cdd]12
[d0528c4]13The tests can be run with ``python GUITests.py``, or to get more verbose
14console output (recommended), use ``python GUITests.py -v``.
[32f6cdd]15"""
16
[464cd07]17# Prepare the general QApplication instance
[4992ff2]18app = QtWidgets.QApplication(sys.argv)
[06b0138]19
20# Main Window
21from MainWindow.UnitTesting import AboutBoxTest
22from MainWindow.UnitTesting import DataExplorerTest
23from MainWindow.UnitTesting import WelcomePanelTest
24from MainWindow.UnitTesting import DroppableDataLoadWidgetTest
25from MainWindow.UnitTesting import GuiManagerTest
26from MainWindow.UnitTesting import MainWindowTest
27
[53c771e]28## Plotting
[06b0138]29from Plotting.UnitTesting import AddTextTest
30from Plotting.UnitTesting import PlotHelperTest
31from Plotting.UnitTesting import WindowTitleTest
[53c771e]32from Plotting.UnitTesting import ScalePropertiesTest
[06b0138]33from Plotting.UnitTesting import SetGraphRangeTest
34from Plotting.UnitTesting import LinearFitTest
35from Plotting.UnitTesting import PlotPropertiesTest
36from Plotting.UnitTesting import PlotUtilitiesTest
37from Plotting.UnitTesting import ColorMapTest
38from Plotting.UnitTesting import BoxSumTest
39from Plotting.UnitTesting import SlicerModelTest
40from Plotting.UnitTesting import SlicerParametersTest
[53c771e]41from Plotting.UnitTesting import PlotterBaseTest
42from Plotting.UnitTesting import PlotterTest
43from Plotting.UnitTesting import Plotter2DTest
[06b0138]44
45# Calculators
46from Calculators.UnitTesting import KiessigCalculatorTest
47from Calculators.UnitTesting import DensityCalculatorTest
48from Calculators.UnitTesting import GenericScatteringCalculatorTest
[464cd07]49from Calculators.UnitTesting import SLDCalculatorTest
50from Calculators.UnitTesting import SlitSizeCalculatorTest
[01cda57]51from Calculators.UnitTesting import ResolutionCalculatorPanelTest
[d5c5d3d]52from Calculators.UnitTesting import DataOperationUtilityTest
[06b0138]53
54# Utilities
55from Utilities.UnitTesting import GuiUtilsTest
56from Utilities.UnitTesting import SasviewLoggerTest
[3b3b40b]57from Utilities.UnitTesting import GridPanelTest
58from Utilities.UnitTesting import ModelEditorTest
59from Utilities.UnitTesting import PluginDefinitionTest
60from Utilities.UnitTesting import TabbedModelEditorTest
[01ef3f7]61from Utilities.UnitTesting import AddMultEditorTest
[57be490]62from Utilities.UnitTesting import ReportDialogTest
[06b0138]63
64# Unit Testing
65from UnitTesting import TestUtilsTest
66
67# Perspectives
[7c487846]68#  Fitting
[06b0138]69from Perspectives.Fitting.UnitTesting import FittingWidgetTest
70from Perspectives.Fitting.UnitTesting import FittingPerspectiveTest
71from Perspectives.Fitting.UnitTesting import FittingLogicTest
72from Perspectives.Fitting.UnitTesting import FittingUtilitiesTest
73from Perspectives.Fitting.UnitTesting import FitPageTest
[72f4834]74from Perspectives.Fitting.UnitTesting import FittingOptionsTest
[0595bb7]75from Perspectives.Fitting.UnitTesting import MultiConstraintTest
[da9a0722]76from Perspectives.Fitting.UnitTesting import ComplexConstraintTest
[676f137]77from Perspectives.Fitting.UnitTesting import ConstraintWidgetTest
[0595bb7]78
[7c487846]79#  Invariant
80from Perspectives.Invariant.UnitTesting import InvariantPerspectiveTest
[06b0138]81
[676f137]82#  Inversion
83from Perspectives.Inversion.UnitTesting import InversionPerspectiveTest
84
[06b0138]85def suite():
86    suites = (
87        # Plotting
88        unittest.makeSuite(Plotter2DTest.Plotter2DTest,               'test'),
[53c771e]89        unittest.makeSuite(PlotHelperTest.PlotHelperTest,             'test'),
[06b0138]90        unittest.makeSuite(AddTextTest.AddTextTest,                   'test'),
[53c771e]91        unittest.makeSuite(WindowTitleTest.WindowTitleTest,           'test'),
[06b0138]92        unittest.makeSuite(ScalePropertiesTest.ScalePropertiesTest,   'test'),
93        unittest.makeSuite(SetGraphRangeTest.SetGraphRangeTest,       'test'),
94        unittest.makeSuite(LinearFitTest.LinearFitTest,               'test'),
95        unittest.makeSuite(PlotPropertiesTest.PlotPropertiesTest,     'test'),
96        unittest.makeSuite(PlotUtilitiesTest.PlotUtilitiesTest,       'test'),
97        unittest.makeSuite(ColorMapTest.ColorMapTest,                 'test'),
98        unittest.makeSuite(BoxSumTest.BoxSumTest,                     'test'),
99        unittest.makeSuite(SlicerModelTest.SlicerModelTest,           'test'),
100        unittest.makeSuite(SlicerParametersTest.SlicerParametersTest, 'test'),
[53c771e]101        unittest.makeSuite(PlotterBaseTest.PlotterBaseTest,           'test'),
102        unittest.makeSuite(PlotterTest.PlotterTest,                   'test'),
[06b0138]103
104        # Main window
105        unittest.makeSuite(DataExplorerTest.DataExplorerTest,  'test'),
[f4a1433]106        unittest.makeSuite(DroppableDataLoadWidgetTest.DroppableDataLoadWidgetTest, 'test'),
[06b0138]107        unittest.makeSuite(MainWindowTest.MainWindowTest,      'test'),
[53c771e]108        unittest.makeSuite(GuiManagerTest.GuiManagerTest,      'test'),
109        unittest.makeSuite(AboutBoxTest.AboutBoxTest,          'test'),
110        unittest.makeSuite(WelcomePanelTest.WelcomePanelTest,  'test'),
[06b0138]111
112        # Utilities
[0261bc1]113        unittest.makeSuite(TestUtilsTest.TestUtilsTest,           'test'),
114        unittest.makeSuite(SasviewLoggerTest.SasviewLoggerTest,   'test'),
115        unittest.makeSuite(GuiUtilsTest.GuiUtilsTest,             'test'),
116        unittest.makeSuite(GuiUtilsTest.DoubleValidatorTest,      'test'),
117        unittest.makeSuite(GuiUtilsTest.HashableStandardItemTest, 'test'),
[3b3b40b]118        unittest.makeSuite(GridPanelTest.BatchOutputPanelTest,    'test'),
119        unittest.makeSuite(ModelEditorTest.ModelEditorTest,            'test'),
120        unittest.makeSuite(PluginDefinitionTest.PluginDefinitionTest,  'test'),
121        unittest.makeSuite(TabbedModelEditorTest.TabbedModelEditorTest,'test'),
[01ef3f7]122        unittest.makeSuite(AddMultEditorTest.AddMultEditorTest, 'test'),
[57be490]123        unittest.makeSuite(ReportDialogTest.ReportDialogTest,     'test'),
[06b0138]124
125        # Calculators
126        unittest.makeSuite(KiessigCalculatorTest.KiessigCalculatorTest,                     'test'),
127        unittest.makeSuite(DensityCalculatorTest.DensityCalculatorTest,                     'test'),
128        unittest.makeSuite(GenericScatteringCalculatorTest.GenericScatteringCalculatorTest, 'test'),
[464cd07]129        unittest.makeSuite(SLDCalculatorTest.SLDCalculatorTest, 'test'),
130        unittest.makeSuite(SlitSizeCalculatorTest.SlitSizeCalculatorTest, 'test'),
[01cda57]131        unittest.makeSuite(ResolutionCalculatorPanelTest.ResolutionCalculatorPanelTest, 'test'),
[d5c5d3d]132        unittest.makeSuite(DataOperationUtilityTest.DataOperationUtilityTest, 'test'),
[06b0138]133
134        # Perspectives
[7c487846]135        #  Fitting
[06b0138]136        unittest.makeSuite(FittingPerspectiveTest.FittingPerspectiveTest, 'test'),
137        unittest.makeSuite(FittingWidgetTest.FittingWidgetTest,           'test'),
138        unittest.makeSuite(FittingLogicTest.FittingLogicTest,             'test'),
139        unittest.makeSuite(FittingUtilitiesTest.FittingUtilitiesTest,     'test'),
140        unittest.makeSuite(FitPageTest.FitPageTest,                       'test'),
[72f4834]141        unittest.makeSuite(FittingOptionsTest.FittingOptionsTest,         'test'),
[0595bb7]142        unittest.makeSuite(MultiConstraintTest.MultiConstraintTest,       'test'),
[676f137]143        unittest.makeSuite(ConstraintWidgetTest.ConstraintWidgetTest,     'test'),
[da9a0722]144        unittest.makeSuite(ComplexConstraintTest.ComplexConstraintTest,   'test'),
[676f137]145
[7c487846]146        #  Invariant
147        unittest.makeSuite(InvariantPerspectiveTest.InvariantPerspectiveTest,  'test'),
[50bfab0]148        #  Inversion
149        unittest.makeSuite(InversionPerspectiveTest.InversionTest,  'test'),
[676f137]150        )
[06b0138]151    return unittest.TestSuite(suites)
152
153if __name__ == "__main__":
154    unittest.main(defaultTest="suite")
155
Note: See TracBrowser for help on using the repository browser.