sas.qtgui.Perspectives.Fitting.UnitTesting package¶
Submodules¶
sas.qtgui.Perspectives.Fitting.UnitTesting.ComplexConstraintTest module¶
- class sas.qtgui.Perspectives.Fitting.UnitTesting.ComplexConstraintTest.ComplexConstraintTest¶
Bases:
object
- __dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.Fitting.UnitTesting.ComplexConstraintTest', 'widget': <function ComplexConstraintTest.widget>, 'testDefaults': <function ComplexConstraintTest.testDefaults>, 'testLabels': <function ComplexConstraintTest.testLabels>, 'testTooltip': <function ComplexConstraintTest.testTooltip>, 'notestValidateFormula': <function ComplexConstraintTest.notestValidateFormula>, 'testValidateConstraint': <function ComplexConstraintTest.testValidateConstraint>, 'testConstraint': <function ComplexConstraintTest.testConstraint>, 'notestOnHelp': <function ComplexConstraintTest.notestOnHelp>, 'testOnSetAll': <function ComplexConstraintTest.testOnSetAll>, 'testOnApply': <function ComplexConstraintTest.testOnApply>, 'testApplyAcrossTabs': <function ComplexConstraintTest.testApplyAcrossTabs>, '__dict__': <attribute '__dict__' of 'ComplexConstraintTest' objects>, '__weakref__': <attribute '__weakref__' of 'ComplexConstraintTest' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __module__ = 'sas.qtgui.Perspectives.Fitting.UnitTesting.ComplexConstraintTest'¶
- __weakref__¶
list of weak references to the object
- notestOnHelp(widget, mocker)¶
Test the default help renderer
- notestValidateFormula(widget, mocker)¶
assure enablement and color for valid formula
- testApplyAcrossTabs(widget)¶
Test the application of constraints across tabs
- testConstraint(widget)¶
Test the return of specified constraint
- testDefaults(widget)¶
Test the GUI in its default state
- testLabels(widget)¶
various labels on the widget
- testOnApply(widget, mocker)¶
Test the application of constraints
- testOnSetAll(widget)¶
Test the Add all option for the constraints
- testTooltip(widget)¶
test the tooltip
- testValidateConstraint(widget)¶
constraint validator test
- widget(qapp, mocker)¶
Create/Destroy the ComplexConstraint
sas.qtgui.Perspectives.Fitting.UnitTesting.ConstraintWidgetTest module¶
- class sas.qtgui.Perspectives.Fitting.UnitTesting.ConstraintWidgetTest.ConstraintWidgetTest¶
Bases:
object
Test the ConstraintWidget dialog
- __dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.Fitting.UnitTesting.ConstraintWidgetTest', '__doc__': 'Test the ConstraintWidget dialog', 'widget': <function ConstraintWidgetTest.widget>, 'testDefaults': <function ConstraintWidgetTest.testDefaults>, 'testOnFitTypeChange': <function ConstraintWidgetTest.testOnFitTypeChange>, 'testGetTabsForFit': <function ConstraintWidgetTest.testGetTabsForFit>, 'testIsTabImportable': <function ConstraintWidgetTest.testIsTabImportable>, 'testOnTabCellEdit': <function ConstraintWidgetTest.testOnTabCellEdit>, 'testUpdateFitLine': <function ConstraintWidgetTest.testUpdateFitLine>, 'testUpdateFitList': <function ConstraintWidgetTest.testUpdateFitList>, 'testOnAcceptConstraint': <function ConstraintWidgetTest.testOnAcceptConstraint>, 'testFitComplete': <function ConstraintWidgetTest.testFitComplete>, 'testBatchFitComplete': <function ConstraintWidgetTest.testBatchFitComplete>, 'testUncheckConstraints': <function ConstraintWidgetTest.testUncheckConstraints>, 'testOnConstraintChange': <function ConstraintWidgetTest.testOnConstraintChange>, '__dict__': <attribute '__dict__' of 'ConstraintWidgetTest' objects>, '__weakref__': <attribute '__weakref__' of 'ConstraintWidgetTest' objects>, '__annotations__': {}})¶
- __doc__ = 'Test the ConstraintWidget dialog'¶
- __module__ = 'sas.qtgui.Perspectives.Fitting.UnitTesting.ConstraintWidgetTest'¶
- __weakref__¶
list of weak references to the object
- testBatchFitComplete(widget, mocker)¶
test the handling of batch fit results
- testDefaults(widget, mocker)¶
Test the GUI in its default state
- testFitComplete(widget, mocker)¶
test the handling of fit results
- testGetTabsForFit(widget)¶
Test the fitting tab list
- testIsTabImportable(widget, mocker)¶
tab checks for consistency
- testOnAcceptConstraint(widget, mocker)¶
test if a constraint can be added
- testOnConstraintChange(widget, mocker)¶
test edition of the constraint list
- testOnFitTypeChange(widget, mocker)¶
test the single/batch fit switch
- testOnTabCellEdit(widget, mocker)¶
test what happens on monicker edit
- testUncheckConstraints(widget, mocker)¶
Tests the unchecking of constraints
- testUpdateFitLine(widget, mocker)¶
See if the fit table row can be updated
- testUpdateFitList(widget, mocker)¶
see if the fit table can be updated
- widget(qapp, mocker)¶
Create/Destroy the ConstraintWidget
sas.qtgui.Perspectives.Fitting.UnitTesting.FitPageTest module¶
- class sas.qtgui.Perspectives.Fitting.UnitTesting.FitPageTest.FitPageTest¶
Bases:
object
Test the FitPage methods
- __dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.Fitting.UnitTesting.FitPageTest', '__doc__': 'Test the FitPage methods', 'page': <function FitPageTest.page>, 'testDefaults': <function FitPageTest.testDefaults>, 'testSave': <function FitPageTest.testSave>, 'testLoad': <function FitPageTest.testLoad>, '__dict__': <attribute '__dict__' of 'FitPageTest' objects>, '__weakref__': <attribute '__weakref__' of 'FitPageTest' objects>, '__annotations__': {}})¶
- __doc__ = 'Test the FitPage methods'¶
- __module__ = 'sas.qtgui.Perspectives.Fitting.UnitTesting.FitPageTest'¶
- __weakref__¶
list of weak references to the object
- page(qapp)¶
Create/Destroy the AboutBox
- testDefaults(page)¶
Test all the global constants defined in the file.
- testLoad()¶
Test state load
- testSave()¶
Test state save
sas.qtgui.Perspectives.Fitting.UnitTesting.FittingLogicTest module¶
- class sas.qtgui.Perspectives.Fitting.UnitTesting.FittingLogicTest.FittingLogicTest¶
Bases:
object
Test the fitting logic class
- __dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.Fitting.UnitTesting.FittingLogicTest', '__doc__': 'Test the fitting logic class', 'logic': <function FittingLogicTest.logic>, 'testDefaults': <function FittingLogicTest.testDefaults>, 'testComputeDataRange': <function FittingLogicTest.testComputeDataRange>, 'testCreateDefault1dData': <function FittingLogicTest.testCreateDefault1dData>, 'testCreateDefault2dData': <function FittingLogicTest.testCreateDefault2dData>, 'testNew1DPlot': <function FittingLogicTest.testNew1DPlot>, 'testNew2DPlot': <function FittingLogicTest.testNew2DPlot>, '__dict__': <attribute '__dict__' of 'FittingLogicTest' objects>, '__weakref__': <attribute '__weakref__' of 'FittingLogicTest' objects>, '__annotations__': {}})¶
- __doc__ = 'Test the fitting logic class'¶
- __module__ = 'sas.qtgui.Perspectives.Fitting.UnitTesting.FittingLogicTest'¶
- __weakref__¶
list of weak references to the object
- logic(qapp)¶
Create/Destroy the component
- testComputeDataRange(logic)¶
Tests the data range calculator on Data1D/Data2D
- testCreateDefault1dData(logic)¶
Tests the default 1D set
- testCreateDefault2dData(logic)¶
Tests the default 2D set
- testDefaults(logic)¶
Test the component in its default state
- testNew1DPlot(logic)¶
Test how the extra shells are presented
- testNew2DPlot(logic)¶
Test the additional rows added by modifying the shells combobox
sas.qtgui.Perspectives.Fitting.UnitTesting.FittingOptionsTest module¶
- class sas.qtgui.Perspectives.Fitting.UnitTesting.FittingOptionsTest.FittingOptionsTest¶
Bases:
object
Test the FittingOptions dialog
- __dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.Fitting.UnitTesting.FittingOptionsTest', '__doc__': 'Test the FittingOptions dialog', 'widget': <function FittingOptionsTest.widget>, 'testDefaults': <function FittingOptionsTest.testDefaults>, 'testAssignValidators': <function FittingOptionsTest.testAssignValidators>, 'testOnAlgorithmChange': <function FittingOptionsTest.testOnAlgorithmChange>, 'testOnApply': <function FittingOptionsTest.testOnApply>, 'testOnHelp': <function FittingOptionsTest.testOnHelp>, 'testWidgetFromOptions': <function FittingOptionsTest.testWidgetFromOptions>, 'testUpdateWidgetFromBumps': <function FittingOptionsTest.testUpdateWidgetFromBumps>, '__dict__': <attribute '__dict__' of 'FittingOptionsTest' objects>, '__weakref__': <attribute '__weakref__' of 'FittingOptionsTest' objects>, '__annotations__': {}})¶
- __doc__ = 'Test the FittingOptions dialog'¶
- __module__ = 'sas.qtgui.Perspectives.Fitting.UnitTesting.FittingOptionsTest'¶
- __weakref__¶
list of weak references to the object
- testAssignValidators(widget)¶
Check that line edits got correct validators
- testDefaults(widget)¶
Test the GUI in its default state
- testOnAlgorithmChange(widget)¶
Test the combo box change callback
- testOnApply(widget)¶
Test bumps update
- testOnHelp(widget, mocker)¶
Test help display
- testUpdateWidgetFromBumps(widget)¶
Test the widget update
- testWidgetFromOptions(widget)¶
Test the helper function
- widget(qapp)¶
Create/Destroy the FittingOptions
sas.qtgui.Perspectives.Fitting.UnitTesting.FittingPerspectiveTest module¶
- class sas.qtgui.Perspectives.Fitting.UnitTesting.FittingPerspectiveTest.FittingPerspectiveTest¶
Bases:
object
Test the Fitting Perspective
- __dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.Fitting.UnitTesting.FittingPerspectiveTest', '__doc__': 'Test the Fitting Perspective', 'widget': <function FittingPerspectiveTest.widget>, 'testDefaults': <function FittingPerspectiveTest.testDefaults>, 'testAddTab': <function FittingPerspectiveTest.testAddTab>, 'testAddCSTab': <function FittingPerspectiveTest.testAddCSTab>, 'testResetTab': <function FittingPerspectiveTest.testResetTab>, 'testCloseTab': <function FittingPerspectiveTest.testCloseTab>, 'testAllowBatch': <function FittingPerspectiveTest.testAllowBatch>, 'testSetData': <function FittingPerspectiveTest.testSetData>, 'testSwapData': <function FittingPerspectiveTest.testSwapData>, 'testSetBatchData': <function FittingPerspectiveTest.testSetBatchData>, 'testGetFitTabs': <function FittingPerspectiveTest.testGetFitTabs>, 'testGetActiveConstraintList': <function FittingPerspectiveTest.testGetActiveConstraintList>, 'testGetSymbolDictForConstraints': <function FittingPerspectiveTest.testGetSymbolDictForConstraints>, 'testGetConstraintTab': <function FittingPerspectiveTest.testGetConstraintTab>, 'testSerialization': <function FittingPerspectiveTest.testSerialization>, 'testUpdateFromConstraints': <function FittingPerspectiveTest.testUpdateFromConstraints>, 'testGetTabByName': <function FittingPerspectiveTest.testGetTabByName>, '__dict__': <attribute '__dict__' of 'FittingPerspectiveTest' objects>, '__weakref__': <attribute '__weakref__' of 'FittingPerspectiveTest' objects>, '__annotations__': {}})¶
- __doc__ = 'Test the Fitting Perspective'¶
- __module__ = 'sas.qtgui.Perspectives.Fitting.UnitTesting.FittingPerspectiveTest'¶
- __weakref__¶
list of weak references to the object
- testAddCSTab(widget)¶
Add a constraint/simult tab
- testAddTab(widget)¶
Add a tab and test it
- testAllowBatch(widget)¶
Assure the perspective allows multiple datasets
- testCloseTab(widget)¶
Delete a tab and test
- testDefaults(widget)¶
Test the GUI in its default state
- testGetActiveConstraintList(widget, mocker)¶
test the active constraint getter
- testGetConstraintTab(widget, qtbot)¶
test the constraint tab getter
- testGetFitTabs(widget)¶
test the fit tab getter method
- testGetSymbolDictForConstraints(widget, mocker)¶
test the symbol dict getter
- testGetTabByName(widget)¶
test getting a tab by its name
- testResetTab(widget, mocker)¶
Remove data from last tab
- testSerialization(widget, mocker)¶
Serialize fit pages and check data
- testSetBatchData(widget, mocker)¶
Assure that setting batch data is correct
- testSetData(widget, qtbot, mocker)¶
Assure that setting data is correct
- testSwapData(widget, mocker)¶
Assure that data swapping is correct
- testUpdateFromConstraints(widget, mocker)¶
tests the method that parses the loaded project dict and retuens a dict with constrains across all fit pages
- widget(qapp)¶
Create/Destroy the perspective
sas.qtgui.Perspectives.Fitting.UnitTesting.FittingUtilitiesTest module¶
- class sas.qtgui.Perspectives.Fitting.UnitTesting.FittingUtilitiesTest.FittingUtilitiesTest¶
Bases:
object
Test the Fitting Utilities functions
- __dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.Fitting.UnitTesting.FittingUtilitiesTest', '__doc__': 'Test the Fitting Utilities functions', 'testReplaceShellName': <function FittingUtilitiesTest.testReplaceShellName>, 'testGetIterParams': <function FittingUtilitiesTest.testGetIterParams>, 'testGetMultiplicity': <function FittingUtilitiesTest.testGetMultiplicity>, 'testAddParametersToModel': <function FittingUtilitiesTest.testAddParametersToModel>, 'testAddSimpleParametersToModel': <function FittingUtilitiesTest.testAddSimpleParametersToModel>, 'testAddCheckedListToModel': <function FittingUtilitiesTest.testAddCheckedListToModel>, 'testAddShellsToModel': <function FittingUtilitiesTest.testAddShellsToModel>, 'testCalculate1DChi2': <function FittingUtilitiesTest.testCalculate1DChi2>, 'testCalculate2DChi2': <function FittingUtilitiesTest.testCalculate2DChi2>, 'notestAddHeadersToModel': <function FittingUtilitiesTest.notestAddHeadersToModel>, 'testCheckConstraints': <function FittingUtilitiesTest.testCheckConstraints>, '__dict__': <attribute '__dict__' of 'FittingUtilitiesTest' objects>, '__weakref__': <attribute '__weakref__' of 'FittingUtilitiesTest' objects>, '__annotations__': {}})¶
- __doc__ = 'Test the Fitting Utilities functions'¶
- __module__ = 'sas.qtgui.Perspectives.Fitting.UnitTesting.FittingUtilitiesTest'¶
- __weakref__¶
list of weak references to the object
- notestAddHeadersToModel()¶
Check to see if headers are correctly applied
- testAddCheckedListToModel()¶
Test for inserting a checkboxed item into a QModel
- testAddParametersToModel()¶
Checks the QModel update from Sasmodel parameters
- testAddShellsToModel()¶
Test for inserting a list of QItems into a model
- testAddSimpleParametersToModel()¶
Checks the QModel update from Sasmodel parameters - no polydisp
- testCalculate1DChi2()¶
Test the chi2 calculator for Data1D
- testCalculate2DChi2()¶
Test the chi2 calculator for Data2D
- testCheckConstraints()¶
Test the constraints checks
- testGetIterParams()¶
Assure the right multishell parameters are returned
- testGetMultiplicity()¶
Assure more multishell parameters are evaluated correctly
- testReplaceShellName()¶
Test the utility function for string manipulation
sas.qtgui.Perspectives.Fitting.UnitTesting.FittingWidgetTest module¶
- class sas.qtgui.Perspectives.Fitting.UnitTesting.FittingWidgetTest.FittingWidgetMod(parent=None, data=None, tab_id=1)¶
Bases:
FittingWidget
- __doc__ = None¶
- __module__ = 'sas.qtgui.Perspectives.Fitting.UnitTesting.FittingWidgetTest'¶
- customModels()¶
Reads in file names from the modified plugin directory to test handling of plugin models.
- staticMetaObject = PySide6.QtCore.QMetaObject("FittingWidgetMod" inherits "FittingWidget": )¶
- class sas.qtgui.Perspectives.Fitting.UnitTesting.FittingWidgetTest.FittingWidgetTest¶
Bases:
object
Test the fitting widget GUI
- __dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.Fitting.UnitTesting.FittingWidgetTest', '__doc__': 'Test the fitting widget GUI', 'widget': <function FittingWidgetTest.widget>, 'testDefaults': <function FittingWidgetTest.testDefaults>, 'testSelectCategoryDefault': <function FittingWidgetTest.testSelectCategoryDefault>, 'testWidgetWithData': <function FittingWidgetTest.testWidgetWithData>, 'testSelectPolydispersity': <function FittingWidgetTest.testSelectPolydispersity>, 'testSelectMagnetism': <function FittingWidgetTest.testSelectMagnetism>, 'testSelectStructureFactor': <function FittingWidgetTest.testSelectStructureFactor>, 'testSignals': <function FittingWidgetTest.testSignals>, 'testSelectCategory': <function FittingWidgetTest.testSelectCategory>, 'testSelectModel': <function FittingWidgetTest.testSelectModel>, 'testSelectFactor': <function FittingWidgetTest.testSelectFactor>, 'testReadCategoryInfo': <function FittingWidgetTest.testReadCategoryInfo>, 'testUpdateParamsFromModel': <function FittingWidgetTest.testUpdateParamsFromModel>, 'testCreateTheoryIndex': <function FittingWidgetTest.testCreateTheoryIndex>, 'testCalculateQGridForModel': <function FittingWidgetTest.testCalculateQGridForModel>, 'testCalculateResiduals': <function FittingWidgetTest.testCalculateResiduals>, 'testSetPolyModel': <function FittingWidgetTest.testSetPolyModel>, 'testPolyModelChange': <function FittingWidgetTest.testPolyModelChange>, 'testOnPolyComboIndexChange': <function FittingWidgetTest.testOnPolyComboIndexChange>, 'testLoadPolydispArray': <function FittingWidgetTest.testLoadPolydispArray>, 'testSetMagneticModel': <function FittingWidgetTest.testSetMagneticModel>, 'testAddExtraShells': <function FittingWidgetTest.testAddExtraShells>, 'testModifyShellsInList': <function FittingWidgetTest.testModifyShellsInList>, 'testPlotTheory': <function FittingWidgetTest.testPlotTheory>, 'notestPlotData': <function FittingWidgetTest.notestPlotData>, 'testOnEmptyFit': <function FittingWidgetTest.testOnEmptyFit>, 'testOnEmptyFit2': <function FittingWidgetTest.testOnEmptyFit2>, 'notestOnFit1D': <function FittingWidgetTest.notestOnFit1D>, 'notestOnFit2D': <function FittingWidgetTest.notestOnFit2D>, 'testOnHelp': <function FittingWidgetTest.testOnHelp>, 'testReadFitPage': <function FittingWidgetTest.testReadFitPage>, 'notestReadFitPage2D': <function FittingWidgetTest.notestReadFitPage2D>, 'testCurrentState': <function FittingWidgetTest.testCurrentState>, 'notestPushFitPage': <function FittingWidgetTest.notestPushFitPage>, 'testPopFitPage': <function FittingWidgetTest.testPopFitPage>, 'testOnMainPageChange': <function FittingWidgetTest.testOnMainPageChange>, 'testModelContextMenu': <function FittingWidgetTest.testModelContextMenu>, 'testShowModelContextMenu': <function FittingWidgetTest.testShowModelContextMenu>, 'testShowMultiConstraint': <function FittingWidgetTest.testShowMultiConstraint>, 'testGetRowFromName': <function FittingWidgetTest.testGetRowFromName>, 'testGetParamNames': <function FittingWidgetTest.testGetParamNames>, 'testAddConstraintToRow': <function FittingWidgetTest.testAddConstraintToRow>, 'testAddSimpleConstraint': <function FittingWidgetTest.testAddSimpleConstraint>, 'testDeleteConstraintOnParameter': <function FittingWidgetTest.testDeleteConstraintOnParameter>, 'testGetConstraintForRow': <function FittingWidgetTest.testGetConstraintForRow>, 'testRowHasConstraint': <function FittingWidgetTest.testRowHasConstraint>, 'testRowHasActiveConstraint': <function FittingWidgetTest.testRowHasActiveConstraint>, 'testGetConstraintsForModel': <function FittingWidgetTest.testGetConstraintsForModel>, 'testReplaceConstraintName': <function FittingWidgetTest.testReplaceConstraintName>, 'testRetainParametersBetweenModelChange': <function FittingWidgetTest.testRetainParametersBetweenModelChange>, 'testOnParameterPaste': <function FittingWidgetTest.testOnParameterPaste>, 'testGetConstraintsForFitting': <function FittingWidgetTest.testGetConstraintsForFitting>, 'testQRangeReset': <function FittingWidgetTest.testQRangeReset>, '__dict__': <attribute '__dict__' of 'FittingWidgetTest' objects>, '__weakref__': <attribute '__weakref__' of 'FittingWidgetTest' objects>, '__annotations__': {}})¶
- __doc__ = 'Test the fitting widget GUI'¶
- __module__ = 'sas.qtgui.Perspectives.Fitting.UnitTesting.FittingWidgetTest'¶
- __weakref__¶
list of weak references to the object
- notestOnFit1D(widget)¶
Test the threaded fitting call
- notestOnFit2D(widget)¶
Test the threaded fitting call
- notestPlotData(widget)¶
See that data item can produce a chart
- notestPushFitPage(widget)¶
Push current state of fitpage onto stack
- notestReadFitPage2D(widget)¶
Read in the fitpage object and restore state
- testAddConstraintToRow(widget, mocker)¶
Test the constraint row add operation
- testAddExtraShells(widget)¶
Test how the extra shells are presented
- testAddSimpleConstraint(widget)¶
Test the constraint add operation
- testCalculateQGridForModel(widget, mocker)¶
Check that the fitting 1D data object is ready
- testCalculateResiduals(widget)¶
Check that the residuals are calculated and plots updated
- testCreateTheoryIndex(widget)¶
Test the data->QIndex conversion
- testCurrentState(widget)¶
Set up the fitpage with current state
- testDefaults(widget)¶
Test the GUI in its default state
- testDeleteConstraintOnParameter(widget)¶
Test the constraint deletion in model/view
- testGetConstraintForRow(widget)¶
Helper function for parameter table
- testGetConstraintsForFitting(widget, mocker)¶
Test the deactivation of constraints when trying to fit a single page with constraints relying on other pages
- testGetConstraintsForModel(widget)¶
Test the constraint getter for constraint texts
- testGetParamNames(widget)¶
Helper function for parameter table
- testGetRowFromName(widget)¶
Helper function for parameter table
- testLoadPolydispArray(widget, mocker)¶
Test opening of the load file dialog for ‘array’ polydisp. function
- testModelContextMenu(widget)¶
Test the right click context menu in the parameter table
- testModifyShellsInList(widget)¶
Test the additional rows added by modifying the shells combobox
- testOnEmptyFit(widget, mocker)¶
Test a 1D/2D fit with no parameters
- testOnEmptyFit2(widget, mocker)¶
- testOnHelp(widget, mocker)¶
Test various help pages shown in this widget
- testOnMainPageChange(widget)¶
Test update values of modified parameters in models
- testOnParameterPaste(widget, mocker)¶
Test response of the widget to clipboard content paste request
- testOnPolyComboIndexChange(widget, mocker)¶
Test the slot method for polydisp. combo box index change
- testPlotTheory(widget)¶
See that theory item can produce a chart
- testPolyModelChange(widget)¶
Polydispersity model changed - test all possible scenarios
- testPopFitPage(widget)¶
Pop current state of fitpage from stack
- testQRangeReset(widget, mocker)¶
Test onRangeReset w/ and w/o data loaded
- testReadCategoryInfo(widget)¶
Check the category file reader
- testReadFitPage(widget)¶
Read in the fitpage object and restore state
- testReplaceConstraintName(widget)¶
Test the replacement of constraint moniker
- testRetainParametersBetweenModelChange(widget)¶
Test constantess of model parameters on model change
- testRowHasActiveConstraint(widget)¶
Helper function for parameter table
- testRowHasConstraint(widget)¶
Helper function for parameter table
- testSelectCategory(widget)¶
Assure proper behaviour on changing category
- testSelectCategoryDefault(widget)¶
Test if model categories have been loaded properly
- testSelectFactor(widget)¶
Assure proper behaviour on changing structure factor
- testSelectMagnetism(widget)¶
Test if models have been loaded properly
- testSelectModel(widget, mocker)¶
Assure proper behaviour on changing model
- testSelectPolydispersity(widget)¶
Test if models have been loaded properly
- testSelectStructureFactor(widget)¶
Test if structure factors have been loaded properly, including plugins also classified as a structure factor.
- testSetMagneticModel(widget)¶
Test the magnetic model setup
- testSetPolyModel(widget)¶
Test the polydispersity model setup
- testShowModelContextMenu(widget, mocker)¶
- testShowMultiConstraint(widget, mocker)¶
Test the widget update on new multi constraint
- testSignals(widget)¶
Test the widget emitted signals
- testUpdateParamsFromModel(widget)¶
Checks the sasmodel parameter update from QModel items
- testWidgetWithData(widget, mocker)¶
Test the instantiation of the widget with initial data
- widget(qapp, mocker)¶
Create/Destroy the GUI
- class sas.qtgui.Perspectives.Fitting.UnitTesting.FittingWidgetTest.ModelManagerBaseMod¶
Bases:
ModelManagerBase
Inherits from ModelManagerBase class and is the base class for the ModelManagerMod. Modified to test handling of plugin models.
- __doc__ = '\n Inherits from ModelManagerBase class and is the base class for the ModelManagerMod.\n Modified to test handling of plugin models.\n '¶
- __module__ = 'sas.qtgui.Perspectives.Fitting.UnitTesting.FittingWidgetTest'¶
- _is_plugin_dir_changed()¶
Originally checked if the plugin directory has changed, returning True if so. Now returns False in all cases to test handling of plugin models.
- plugins_reset()¶
Returns a dictionary of the models, but will now utilize the find_plugin_models_mod function.
- class sas.qtgui.Perspectives.Fitting.UnitTesting.FittingWidgetTest.ModelManagerMod¶
Bases:
ModelManager
Inherits from ModelManager class which manages the list of available models. Modified to test handling of plugin models.
- __doc__ = '\n Inherits from ModelManager class which manages the list of available models.\n Modified to test handling of plugin models.\n '¶
- __init__()¶
- __module__ = 'sas.qtgui.Perspectives.Fitting.UnitTesting.FittingWidgetTest'¶
- base: <sas.sascalc.fit.models.ModelManagerBase object at 0x000002104942D4D0> = None¶
- class sas.qtgui.Perspectives.Fitting.UnitTesting.FittingWidgetTest.dummy_manager¶
Bases:
object
- HELP_DIRECTORY_LOCATION = 'html'¶
- __dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.Fitting.UnitTesting.FittingWidgetTest', 'HELP_DIRECTORY_LOCATION': 'html', 'communicate': <sas.qtgui.Utilities.GuiUtils.Communicate(0x21040be7f20)>, '__init__': <function dummy_manager.__init__>, 'perspective': <function dummy_manager.perspective>, '__dict__': <attribute '__dict__' of 'dummy_manager' objects>, '__weakref__': <attribute '__weakref__' of 'dummy_manager' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __init__()¶
- __module__ = 'sas.qtgui.Perspectives.Fitting.UnitTesting.FittingWidgetTest'¶
- __weakref__¶
list of weak references to the object
- communicate = <sas.qtgui.Utilities.GuiUtils.Communicate(0x21040be7f20)>¶
- perspective()¶
- class sas.qtgui.Perspectives.Fitting.UnitTesting.FittingWidgetTest.dummy_perspective¶
Bases:
object
- __dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.Fitting.UnitTesting.FittingWidgetTest', '__init__': <function dummy_perspective.__init__>, 'getActiveConstraintList': <function dummy_perspective.getActiveConstraintList>, 'getSymbolDictForConstraints': <function dummy_perspective.getSymbolDictForConstraints>, 'getConstraintTab': <function dummy_perspective.getConstraintTab>, '__dict__': <attribute '__dict__' of 'dummy_perspective' objects>, '__weakref__': <attribute '__weakref__' of 'dummy_perspective' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __init__()¶
- __module__ = 'sas.qtgui.Perspectives.Fitting.UnitTesting.FittingWidgetTest'¶
- __weakref__¶
list of weak references to the object
- getActiveConstraintList()¶
- getConstraintTab()¶
- getSymbolDictForConstraints()¶
- sas.qtgui.Perspectives.Fitting.UnitTesting.FittingWidgetTest.find_plugin_models_mod()¶
Modification to sas.sascalc.fit.models.find_plugin_models(). Instead of searching for user’s plugin directory, the path is set at: ‘sas/qtgui/Perspectives/Fitting/plugin_models’ Modified to test handling of plugin models.
sas.qtgui.Perspectives.Fitting.UnitTesting.MultiConstraintTest module¶
- class sas.qtgui.Perspectives.Fitting.UnitTesting.MultiConstraintTest.MultiConstraintTest¶
Bases:
object
Test the MultiConstraint dialog
- __dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.Fitting.UnitTesting.MultiConstraintTest', '__doc__': 'Test the MultiConstraint dialog', 'widget': <function MultiConstraintTest.widget>, 'testDefaults': <function MultiConstraintTest.testDefaults>, 'testLabels': <function MultiConstraintTest.testLabels>, 'testTooltip': <function MultiConstraintTest.testTooltip>, 'testValidateFormula': <function MultiConstraintTest.testValidateFormula>, 'testValidateConstraint': <function MultiConstraintTest.testValidateConstraint>, 'testOnHelp': <function MultiConstraintTest.testOnHelp>, '__dict__': <attribute '__dict__' of 'MultiConstraintTest' objects>, '__weakref__': <attribute '__weakref__' of 'MultiConstraintTest' objects>, '__annotations__': {}})¶
- __doc__ = 'Test the MultiConstraint dialog'¶
- __module__ = 'sas.qtgui.Perspectives.Fitting.UnitTesting.MultiConstraintTest'¶
- __weakref__¶
list of weak references to the object
- testDefaults(widget)¶
Test the GUI in its default state
- testLabels(widget)¶
various labels on the widget
- testOnHelp(widget, mocker)¶
Test the default help renderer
- testTooltip(widget)¶
test the tooltip
- testValidateConstraint(widget)¶
constraint validator test
- testValidateFormula(widget, mocker)¶
assure enablement and color for valid formula
- widget(qapp)¶
Create/Destroy the MultiConstraint