source: sasview/src/sas/qtgui/GUITests.py @ f1ec901

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalc
Last change on this file since f1ec901 was 0261bc1, checked in by Piotr Rozyczko <rozyczko@…>, 7 years ago

Added unit tests for recent functionality

  • Property mode set to 100644
File size: 5.9 KB
RevLine 
[06b0138]1import unittest
[464cd07]2import sys
[4992ff2]3from PyQt5 import QtGui
4from PyQt5 import QtWidgets
[464cd07]5
6# Prepare the general QApplication instance
[4992ff2]7app = QtWidgets.QApplication(sys.argv)
[06b0138]8
9# Main Window
10from MainWindow.UnitTesting import AboutBoxTest
11from MainWindow.UnitTesting import DataExplorerTest
12from MainWindow.UnitTesting import WelcomePanelTest
13from MainWindow.UnitTesting import DroppableDataLoadWidgetTest
14from MainWindow.UnitTesting import GuiManagerTest
15from MainWindow.UnitTesting import MainWindowTest
16
[53c771e]17## Plotting
[06b0138]18from Plotting.UnitTesting import AddTextTest
19from Plotting.UnitTesting import PlotHelperTest
20from Plotting.UnitTesting import WindowTitleTest
[53c771e]21from Plotting.UnitTesting import ScalePropertiesTest
[06b0138]22from Plotting.UnitTesting import SetGraphRangeTest
23from Plotting.UnitTesting import LinearFitTest
24from Plotting.UnitTesting import PlotPropertiesTest
25from Plotting.UnitTesting import PlotUtilitiesTest
26from Plotting.UnitTesting import ColorMapTest
27from Plotting.UnitTesting import BoxSumTest
28from Plotting.UnitTesting import SlicerModelTest
29from Plotting.UnitTesting import SlicerParametersTest
[53c771e]30from Plotting.UnitTesting import PlotterBaseTest
31from Plotting.UnitTesting import PlotterTest
32from Plotting.UnitTesting import Plotter2DTest
[06b0138]33
34# Calculators
35from Calculators.UnitTesting import KiessigCalculatorTest
36from Calculators.UnitTesting import DensityCalculatorTest
37from Calculators.UnitTesting import GenericScatteringCalculatorTest
[464cd07]38from Calculators.UnitTesting import SLDCalculatorTest
39from Calculators.UnitTesting import SlitSizeCalculatorTest
[01cda57]40from Calculators.UnitTesting import ResolutionCalculatorPanelTest
[d5c5d3d]41from Calculators.UnitTesting import DataOperationUtilityTest
[06b0138]42
43# Utilities
44from Utilities.UnitTesting import GuiUtilsTest
45from Utilities.UnitTesting import SasviewLoggerTest
46
47# Unit Testing
48from UnitTesting import TestUtilsTest
49
50# Perspectives
[7c487846]51#  Fitting
[06b0138]52from Perspectives.Fitting.UnitTesting import FittingWidgetTest
53from Perspectives.Fitting.UnitTesting import FittingPerspectiveTest
54from Perspectives.Fitting.UnitTesting import FittingLogicTest
55from Perspectives.Fitting.UnitTesting import FittingUtilitiesTest
56from Perspectives.Fitting.UnitTesting import FitPageTest
[72f4834]57from Perspectives.Fitting.UnitTesting import FittingOptionsTest
[7c487846]58#  Invariant
59from Perspectives.Invariant.UnitTesting import InvariantPerspectiveTest
60from Perspectives.Invariant.UnitTesting import InvariantDetailsTest
61
[06b0138]62
63def suite():
64    suites = (
65        # Plotting
66        unittest.makeSuite(Plotter2DTest.Plotter2DTest,               'test'),
[53c771e]67        unittest.makeSuite(PlotHelperTest.PlotHelperTest,             'test'),
[06b0138]68        unittest.makeSuite(AddTextTest.AddTextTest,                   'test'),
[53c771e]69        unittest.makeSuite(WindowTitleTest.WindowTitleTest,           'test'),
[06b0138]70        unittest.makeSuite(ScalePropertiesTest.ScalePropertiesTest,   'test'),
71        unittest.makeSuite(SetGraphRangeTest.SetGraphRangeTest,       'test'),
72        unittest.makeSuite(LinearFitTest.LinearFitTest,               'test'),
73        unittest.makeSuite(PlotPropertiesTest.PlotPropertiesTest,     'test'),
74        unittest.makeSuite(PlotUtilitiesTest.PlotUtilitiesTest,       'test'),
75        unittest.makeSuite(ColorMapTest.ColorMapTest,                 'test'),
76        unittest.makeSuite(BoxSumTest.BoxSumTest,                     'test'),
77        unittest.makeSuite(SlicerModelTest.SlicerModelTest,           'test'),
78        unittest.makeSuite(SlicerParametersTest.SlicerParametersTest, 'test'),
[53c771e]79        unittest.makeSuite(PlotterBaseTest.PlotterBaseTest,           'test'),
80        unittest.makeSuite(PlotterTest.PlotterTest,                   'test'),
[06b0138]81
82        # Main window
83        unittest.makeSuite(DataExplorerTest.DataExplorerTest,  'test'),
[f4a1433]84        unittest.makeSuite(DroppableDataLoadWidgetTest.DroppableDataLoadWidgetTest, 'test'),
[06b0138]85        unittest.makeSuite(MainWindowTest.MainWindowTest,      'test'),
[53c771e]86        unittest.makeSuite(GuiManagerTest.GuiManagerTest,      'test'),
87        unittest.makeSuite(AboutBoxTest.AboutBoxTest,          'test'),
88        unittest.makeSuite(WelcomePanelTest.WelcomePanelTest,  'test'),
[06b0138]89
90        # Utilities
[0261bc1]91        unittest.makeSuite(TestUtilsTest.TestUtilsTest,           'test'),
92        unittest.makeSuite(SasviewLoggerTest.SasviewLoggerTest,   'test'),
93        unittest.makeSuite(GuiUtilsTest.GuiUtilsTest,             'test'),
94        unittest.makeSuite(GuiUtilsTest.DoubleValidatorTest,      'test'),
95        unittest.makeSuite(GuiUtilsTest.HashableStandardItemTest, 'test'),
[06b0138]96
97        # Calculators
98        unittest.makeSuite(KiessigCalculatorTest.KiessigCalculatorTest,                     'test'),
99        unittest.makeSuite(DensityCalculatorTest.DensityCalculatorTest,                     'test'),
100        unittest.makeSuite(GenericScatteringCalculatorTest.GenericScatteringCalculatorTest, 'test'),
[464cd07]101        unittest.makeSuite(SLDCalculatorTest.SLDCalculatorTest, 'test'),
102        unittest.makeSuite(SlitSizeCalculatorTest.SlitSizeCalculatorTest, 'test'),
[01cda57]103        unittest.makeSuite(ResolutionCalculatorPanelTest.ResolutionCalculatorPanelTest, 'test'),
[d5c5d3d]104        unittest.makeSuite(DataOperationUtilityTest.DataOperationUtilityTest, 'test'),
[06b0138]105
106        # Perspectives
[7c487846]107        #  Fitting
[06b0138]108        unittest.makeSuite(FittingPerspectiveTest.FittingPerspectiveTest, 'test'),
109        unittest.makeSuite(FittingWidgetTest.FittingWidgetTest,           'test'),
110        unittest.makeSuite(FittingLogicTest.FittingLogicTest,             'test'),
111        unittest.makeSuite(FittingUtilitiesTest.FittingUtilitiesTest,     'test'),
112        unittest.makeSuite(FitPageTest.FitPageTest,                       'test'),
[72f4834]113        unittest.makeSuite(FittingOptionsTest.FittingOptionsTest,         'test'),
[7c487846]114        #  Invariant
115        unittest.makeSuite(InvariantPerspectiveTest.InvariantPerspectiveTest,  'test'),
116        unittest.makeSuite(InvariantDetailsTest.InvariantDetailsTest,     'test'),
[01cda57]117     )
[06b0138]118    return unittest.TestSuite(suites)
119
120if __name__ == "__main__":
121    unittest.main(defaultTest="suite")
122
Note: See TracBrowser for help on using the repository browser.