sas.qtgui.Calculators.UnitTesting package

Submodules

sas.qtgui.Calculators.UnitTesting.DataOperationUtilityTest module

class sas.qtgui.Calculators.UnitTesting.DataOperationUtilityTest.DataOperationUtilityTest

Bases: object

__dict__ = mappingproxy({'__module__': 'sas.qtgui.Calculators.UnitTesting.DataOperationUtilityTest', 'widget': <function DataOperationUtilityTest.widget>, 'testDefaults': <function DataOperationUtilityTest.testDefaults>, 'testHelp': <function DataOperationUtilityTest.testHelp>, 'testOnReset': <function DataOperationUtilityTest.testOnReset>, 'testOnClose': <function DataOperationUtilityTest.testOnClose>, 'testOnCompute': <function DataOperationUtilityTest.testOnCompute>, 'testOnSelectData1': <function DataOperationUtilityTest.testOnSelectData1>, 'testOnSelectData2': <function DataOperationUtilityTest.testOnSelectData2>, 'testUpdateCombobox': <function DataOperationUtilityTest.testUpdateCombobox>, 'testOnSelectOperator': <function DataOperationUtilityTest.testOnSelectOperator>, 'testOnInputCoefficient': <function DataOperationUtilityTest.testOnInputCoefficient>, 'testCheckChosenData': <function DataOperationUtilityTest.testCheckChosenData>, 'testOnCheckOutputName': <function DataOperationUtilityTest.testOnCheckOutputName>, 'testFindId': <function DataOperationUtilityTest.testFindId>, 'testExtractData': <function DataOperationUtilityTest.testExtractData>, 'testOnPrepareOutputData': <function DataOperationUtilityTest.testOnPrepareOutputData>, '__dict__': <attribute '__dict__' of 'DataOperationUtilityTest' objects>, '__weakref__': <attribute '__weakref__' of 'DataOperationUtilityTest' objects>, '__doc__': None, '__annotations__': {}})
__doc__ = None
__module__ = 'sas.qtgui.Calculators.UnitTesting.DataOperationUtilityTest'
__weakref__

list of weak references to the object

testCheckChosenData(widget)

Test check of data compatibility

testDefaults(widget, mocker)

Test the GUI in its default state

testExtractData(widget)

Test function to extract data to be computed from input filenames

testFindId(widget)

Test function to find id of file in list of filenames

testHelp(widget, mocker)

Assure help file is shown

testOnCheckOutputName(widget)

Test OutputName for result of operation

testOnClose(widget)

test Closing window

testOnCompute(widget, mocker)

Test onCompute function

testOnInputCoefficient(widget)

Check input of number when a coefficient is required for operation

testOnPrepareOutputData(widget)
testOnReset(widget)

Test onReset function

testOnSelectData1(widget, mocker)

Test ComboBox for Data1

testOnSelectData2(widget, mocker)

Test ComboBox for Data2

testOnSelectOperator(widget)

Change GUI when operator changed

testUpdateCombobox(widget)

Test change of contents of comboboxes for Data1 and Data2

widget(qapp)

Create/Destroy the DataOperationUtilityPanel

sas.qtgui.Calculators.UnitTesting.DensityCalculatorTest module

class sas.qtgui.Calculators.UnitTesting.DensityCalculatorTest.DensityCalculatorTest

Bases: object

Test the DensityCalculator

__dict__ = mappingproxy({'__module__': 'sas.qtgui.Calculators.UnitTesting.DensityCalculatorTest', '__doc__': 'Test the DensityCalculator', 'widget': <function DensityCalculatorTest.widget>, 'testDefaults': <function DensityCalculatorTest.testDefaults>, 'testModelMolecularFormula': <function DensityCalculatorTest.testModelMolecularFormula>, 'testModelVolume': <function DensityCalculatorTest.testModelVolume>, 'testModelMassDensity': <function DensityCalculatorTest.testModelMassDensity>, 'testSimpleEntry': <function DensityCalculatorTest.testSimpleEntry>, 'testComplexEntryAndReset': <function DensityCalculatorTest.testComplexEntryAndReset>, 'testHelp': <function DensityCalculatorTest.testHelp>, '__dict__': <attribute '__dict__' of 'DensityCalculatorTest' objects>, '__weakref__': <attribute '__weakref__' of 'DensityCalculatorTest' objects>, '__annotations__': {}})
__doc__ = 'Test the DensityCalculator'
__module__ = 'sas.qtgui.Calculators.UnitTesting.DensityCalculatorTest'
__weakref__

list of weak references to the object

testComplexEntryAndReset(widget, qtbot)

User entered compound calculations and subsequent reset

testDefaults(widget)

Test the GUI in its default state

testHelp(widget, mocker)

Assure help file is shown

testModelMassDensity(widget, qtbot)

Default compound calculations

testModelMolecularFormula(widget, qtbot)

Default compound calculations

testModelVolume(widget, qtbot)

Default compound calculations

testSimpleEntry(widget, qtbot)

Default compound calculations

widget(qapp)

Create/Destroy the DensityPanel

class sas.qtgui.Calculators.UnitTesting.DensityCalculatorTest.ToMolarMassTest

Bases: object

Test the auxiliary conversion method

__dict__ = mappingproxy({'__module__': 'sas.qtgui.Calculators.UnitTesting.DensityCalculatorTest', '__doc__': ' Test the auxiliary conversion method', 'testGoodEasy': <function ToMolarMassTest.testGoodEasy>, 'testGoodComplex': <function ToMolarMassTest.testGoodComplex>, 'testGoodComplex2': <function ToMolarMassTest.testGoodComplex2>, 'testBadInputInt': <function ToMolarMassTest.testBadInputInt>, 'testBadInputStr': <function ToMolarMassTest.testBadInputStr>, '__dict__': <attribute '__dict__' of 'ToMolarMassTest' objects>, '__weakref__': <attribute '__weakref__' of 'ToMolarMassTest' objects>, '__annotations__': {}})
__doc__ = ' Test the auxiliary conversion method'
__module__ = 'sas.qtgui.Calculators.UnitTesting.DensityCalculatorTest'
__weakref__

list of weak references to the object

testBadInputInt()
testBadInputStr()
testGoodComplex()
testGoodComplex2()
testGoodEasy()

sas.qtgui.Calculators.UnitTesting.GenericScatteringCalculatorTest module

class sas.qtgui.Calculators.UnitTesting.GenericScatteringCalculatorTest.GenericScatteringCalculatorTest

Bases: object

Test the GenericScatteringCalculator

__dict__ = mappingproxy({'__module__': 'sas.qtgui.Calculators.UnitTesting.GenericScatteringCalculatorTest', '__doc__': 'Test the GenericScatteringCalculator', 'widget': <function GenericScatteringCalculatorTest.widget>, 'testDefaults': <function GenericScatteringCalculatorTest.testDefaults>, 'testHelpButton': <function GenericScatteringCalculatorTest.testHelpButton>, 'testValidator': <function GenericScatteringCalculatorTest.testValidator>, 'testLoadedSLDData': <function GenericScatteringCalculatorTest.testLoadedSLDData>, 'testLoadedPDBButton': <function GenericScatteringCalculatorTest.testLoadedPDBButton>, 'testLoadedOMFButton': <function GenericScatteringCalculatorTest.testLoadedOMFButton>, 'testReset': <function GenericScatteringCalculatorTest.testReset>, 'testCompute': <function GenericScatteringCalculatorTest.testCompute>, 'testDrawButton': <function GenericScatteringCalculatorTest.testDrawButton>, 'testCloseButton': <function GenericScatteringCalculatorTest.testCloseButton>, 'testSaveFile': <function GenericScatteringCalculatorTest.testSaveFile>, '__dict__': <attribute '__dict__' of 'GenericScatteringCalculatorTest' objects>, '__weakref__': <attribute '__weakref__' of 'GenericScatteringCalculatorTest' objects>, '__annotations__': {}})
__doc__ = 'Test the GenericScatteringCalculator'
__module__ = 'sas.qtgui.Calculators.UnitTesting.GenericScatteringCalculatorTest'
__weakref__

list of weak references to the object

testCloseButton(widget)
testCompute(widget, mocker)

Test compute button

testDefaults(widget)

Test the GUI in its default state

testDrawButton(widget, mocker)

Test Draw buttons for 3D plots with and without arrows

testHelpButton(widget, mocker)

Assure help file is shown

testLoadedOMFButton(widget, mocker)

Load omf data and check modifications of GUI

testLoadedPDBButton(widget, mocker)

Load pdb data and check modifications of GUI

testLoadedSLDData(widget, mocker)

Load sld data and check modifications of GUI

testReset(widget)

Test reset button when GUI has been modified

testSaveFile(widget, mocker)

Test Save feature to .sld file

testValidator(widget)

Test the inputs when validators had been defined

widget(qapp)

Create/Destroy the GenericScatteringCalculator

class sas.qtgui.Calculators.UnitTesting.GenericScatteringCalculatorTest.Plotter3DTest

Bases: object

Test 3D plots in real space. The implementation is temporarily in the same script as the Generic SAS calculator

__dict__ = mappingproxy({'__module__': 'sas.qtgui.Calculators.UnitTesting.GenericScatteringCalculatorTest', '__doc__': ' Test 3D plots in real space.\n    The implementation is temporarily in the same script as the Generic SAS\n    calculator', 'plotter': <function Plotter3DTest.plotter>, 'data': <function Plotter3DTest.data>, 'testDataProperty': <function Plotter3DTest.testDataProperty>, 'testShowNoPlot': <function Plotter3DTest.testShowNoPlot>, 'testShow3DPlot': <function Plotter3DTest.testShow3DPlot>, '__dict__': <attribute '__dict__' of 'Plotter3DTest' objects>, '__weakref__': <attribute '__weakref__' of 'Plotter3DTest' objects>, '__annotations__': {}})
__doc__ = ' Test 3D plots in real space.\n    The implementation is temporarily in the same script as the Generic SAS\n    calculator'
__module__ = 'sas.qtgui.Calculators.UnitTesting.GenericScatteringCalculatorTest'
__weakref__

list of weak references to the object

data()

Create/Destroy the plottable data

plotter(qapp)

Create/Destroy the Plotter

testDataProperty(plotter, data)
testShow3DPlot(plotter, data, mocker)
testShowNoPlot(plotter, mocker)

sas.qtgui.Calculators.UnitTesting.KiessigCalculatorTest module

class sas.qtgui.Calculators.UnitTesting.KiessigCalculatorTest.KiessigCalculatorTest

Bases: object

Test the KiessigCalculator

__dict__ = mappingproxy({'__module__': 'sas.qtgui.Calculators.UnitTesting.KiessigCalculatorTest', '__doc__': 'Test the KiessigCalculator', 'widget': <function KiessigCalculatorTest.widget>, 'testDefaults': <function KiessigCalculatorTest.testDefaults>, 'testHelp': <function KiessigCalculatorTest.testHelp>, 'testComplexEntryNumbers': <function KiessigCalculatorTest.testComplexEntryNumbers>, 'testComplexEntryNumbers2': <function KiessigCalculatorTest.testComplexEntryNumbers2>, 'testComplexEntryNumbers3': <function KiessigCalculatorTest.testComplexEntryNumbers3>, 'testComplexEntryLetters': <function KiessigCalculatorTest.testComplexEntryLetters>, '__dict__': <attribute '__dict__' of 'KiessigCalculatorTest' objects>, '__weakref__': <attribute '__weakref__' of 'KiessigCalculatorTest' objects>, '__annotations__': {}})
__doc__ = 'Test the KiessigCalculator'
__module__ = 'sas.qtgui.Calculators.UnitTesting.KiessigCalculatorTest'
__weakref__

list of weak references to the object

testComplexEntryLetters(widget)

User entered compound calculations and subsequent reset

testComplexEntryNumbers(widget)

User entered compound calculations and subsequent reset

testComplexEntryNumbers2(widget)

User entered compound calculations and subsequent reset

testComplexEntryNumbers3(widget)

User entered compound calculations and subsequent reset

testDefaults(widget, mocker)

Test the GUI in its default state

testHelp(widget, mocker)

Assure help file is shown

widget(qapp)

Create/Destroy the KiessigPanel

sas.qtgui.Calculators.UnitTesting.ResolutionCalculatorPanelTest module

class sas.qtgui.Calculators.UnitTesting.ResolutionCalculatorPanelTest.ResolutionCalculatorPanelTest

Bases: object

Test the ResolutionCalculatorPanel

__dict__ = mappingproxy({'__module__': 'sas.qtgui.Calculators.UnitTesting.ResolutionCalculatorPanelTest', '__doc__': 'Test the ResolutionCalculatorPanel', 'widget': <function ResolutionCalculatorPanelTest.widget>, 'testDefaults': <function ResolutionCalculatorPanelTest.testDefaults>, 'testFormatNumber': <function ResolutionCalculatorPanelTest.testFormatNumber>, 'testCheckWavelength': <function ResolutionCalculatorPanelTest.testCheckWavelength>, 'testCheckWavelengthSpread': <function ResolutionCalculatorPanelTest.testCheckWavelengthSpread>, 'testCheckPixels': <function ResolutionCalculatorPanelTest.testCheckPixels>, 'testCheckQx_y': <function ResolutionCalculatorPanelTest.testCheckQx_y>, 'testOnSelectWaveColor': <function ResolutionCalculatorPanelTest.testOnSelectWaveColor>, 'testOnSelectCustomSpectrum': <function ResolutionCalculatorPanelTest.testOnSelectCustomSpectrum>, 'testHelp': <function ResolutionCalculatorPanelTest.testHelp>, 'testOnReset': <function ResolutionCalculatorPanelTest.testOnReset>, 'testOnClose': <function ResolutionCalculatorPanelTest.testOnClose>, 'testOnCompute': <function ResolutionCalculatorPanelTest.testOnCompute>, '__dict__': <attribute '__dict__' of 'ResolutionCalculatorPanelTest' objects>, '__weakref__': <attribute '__weakref__' of 'ResolutionCalculatorPanelTest' objects>, '__annotations__': {}})
__doc__ = 'Test the ResolutionCalculatorPanel'
__module__ = 'sas.qtgui.Calculators.UnitTesting.ResolutionCalculatorPanelTest'
__weakref__

list of weak references to the object

testCheckPixels(widget)

Test validator for pixel size and number

testCheckQx_y(widget)

Test validator for qx and qy inputs

testCheckWavelength(widget)

Test validator for Wavelength text edit

testCheckWavelengthSpread(widget)

Test validator for WavelengthSpread

testDefaults(widget)

Test the GUI in its default state

testFormatNumber(widget)
testHelp(widget, mocker)

Assure help file is shown

testOnClose(widget)

test Closing window

testOnCompute(widget, mocker)
testOnReset(widget)

Test onReset function

testOnSelectCustomSpectrum(widget, mocker)

Test Custom Spectrum: load file if ‘Add New’

testOnSelectWaveColor(widget)

Test change of layout if type of source is TOF

widget(qapp)

Create/Destroy the ResolutionCalculatorPanel

sas.qtgui.Calculators.UnitTesting.SLDCalculatorTest module

class sas.qtgui.Calculators.UnitTesting.SLDCalculatorTest.SLDCalculatorTest

Bases: object

Test the SLDCalculator

__dict__ = mappingproxy({'__module__': 'sas.qtgui.Calculators.UnitTesting.SLDCalculatorTest', '__doc__': 'Test the SLDCalculator', 'widget': <function SLDCalculatorTest.widget>, 'testDefaults': <function SLDCalculatorTest.testDefaults>, 'testSimpleEntry': <function SLDCalculatorTest.testSimpleEntry>, 'testComplexEntryAndReset': <function SLDCalculatorTest.testComplexEntryAndReset>, 'testHelp': <function SLDCalculatorTest.testHelp>, '__dict__': <attribute '__dict__' of 'SLDCalculatorTest' objects>, '__weakref__': <attribute '__weakref__' of 'SLDCalculatorTest' objects>, '__annotations__': {}})
__doc__ = 'Test the SLDCalculator'
__module__ = 'sas.qtgui.Calculators.UnitTesting.SLDCalculatorTest'
__weakref__

list of weak references to the object

testComplexEntryAndReset(widget)

User entered compound calculations and subsequent reset

testDefaults(widget)

Test the GUI in its default state

testHelp(widget, mocker)

Assure help file is shown

testSimpleEntry(widget)

Default compound calculations

widget(qapp)

Create/Destroy the SLDCalculator

class sas.qtgui.Calculators.UnitTesting.SLDCalculatorTest.SldAlgorithmTest

Bases: object

Test the periodictable wrapper

__dict__ = mappingproxy({'__module__': 'sas.qtgui.Calculators.UnitTesting.SLDCalculatorTest', '__doc__': ' Test the periodictable wrapper ', 'testSldAlgorithm1': <function SldAlgorithmTest.testSldAlgorithm1>, 'testSldAlgorithm2': <function SldAlgorithmTest.testSldAlgorithm2>, '__dict__': <attribute '__dict__' of 'SldAlgorithmTest' objects>, '__weakref__': <attribute '__weakref__' of 'SldAlgorithmTest' objects>, '__annotations__': {}})
__doc__ = ' Test the periodictable wrapper '
__module__ = 'sas.qtgui.Calculators.UnitTesting.SLDCalculatorTest'
__weakref__

list of weak references to the object

testSldAlgorithm1()
testSldAlgorithm2()

sas.qtgui.Calculators.UnitTesting.SlitSizeCalculatorTest module

class sas.qtgui.Calculators.UnitTesting.SlitSizeCalculatorTest.SlitSizeCalculatorTest

Bases: object

Test the SlitSizeCalculator

__dict__ = mappingproxy({'__module__': 'sas.qtgui.Calculators.UnitTesting.SlitSizeCalculatorTest', '__doc__': 'Test the SlitSizeCalculator', 'widget': <function SlitSizeCalculatorTest.widget>, 'testDefaults': <function SlitSizeCalculatorTest.testDefaults>, 'testHelp': <function SlitSizeCalculatorTest.testHelp>, 'testBrowseButton': <function SlitSizeCalculatorTest.testBrowseButton>, 'testCalculateSlitSize': <function SlitSizeCalculatorTest.testCalculateSlitSize>, 'testWrongInput': <function SlitSizeCalculatorTest.testWrongInput>, '__dict__': <attribute '__dict__' of 'SlitSizeCalculatorTest' objects>, '__weakref__': <attribute '__weakref__' of 'SlitSizeCalculatorTest' objects>, '__annotations__': {}})
__doc__ = 'Test the SlitSizeCalculator'
__module__ = 'sas.qtgui.Calculators.UnitTesting.SlitSizeCalculatorTest'
__weakref__

list of weak references to the object

testBrowseButton(widget, mocker)
testCalculateSlitSize(widget)

Test slit size calculated value

testDefaults(widget)

Test the GUI in its default state

testHelp(widget, mocker)

Assure help file is shown

testWrongInput(widget, mocker)

Test on wrong input data

widget(qapp)

Create/Destroy the SlitSizeCalculator

Module contents