def test_groupGet_unknown_log_error_code(self):
        errorCode = 0
        # Test with group workspace as input
        self.assertEqual(errorCode, quick.groupGet(self.__wsName, 'samp','MADE-UP-LOG-NAME'))

        # Test with group workspace as input
        self.assertEqual(errorCode, quick.groupGet(mtd[self.__wsName][0].name(), 'samp','MADE-UP-LOG-NAME'))
예제 #2
0
    def test_groupGet_unknown_log_error_code(self):
        errorCode = 0
        # Test with group workspace as input
        self.assertEqual(errorCode, quick.groupGet(self.__wsName, 'samp', 'MADE-UP-LOG-NAME'))

        # Test with group workspace as input
        self.assertEqual(errorCode, quick.groupGet(mtd[self.__wsName][0].name(), 'samp', 'MADE-UP-LOG-NAME'))
    def test_groupGet_histogram_count(self):
        expectedNHistograms = mtd[self.__wsName][0].getNumberHistograms()

        # Test with group workspace as input
        nHistograms = quick.groupGet(self.__wsName, 'wksp')
        self.assertEqual(expectedNHistograms, nHistograms, "Did not fetch the n histograms from ws group")

        # Test with single workspace as input
        nHistograms = quick.groupGet(mtd[self.__wsName][0].name(), 'wksp')
        self.assertEqual(expectedNHistograms, nHistograms, "Did not fetch the n histograms from ws")
예제 #4
0
    def test_groupGet_log_single_value(self):
        expectedNPeriods = 2

        # Test with group workspace as input
        nPeriods = quick.groupGet(self.__wsName, 'samp', 'nperiods')
        self.assertEqual(expectedNPeriods, nPeriods, "Did not fetch the number of periods from ws group")

        # Test with single workspace as input
        nPeriods = quick.groupGet(mtd[self.__wsName][0].name(), 'samp', 'nperiods')
        self.assertEqual(expectedNPeriods, nPeriods, "Did not fetch the number of periods from ws")
예제 #5
0
    def test_groupGet_histogram_count(self):
        expectedNHistograms = mtd[self.__wsName][0].getNumberHistograms()

        # Test with group workspace as input
        nHistograms = quick.groupGet(self.__wsName, 'wksp')
        self.assertEqual(expectedNHistograms, nHistograms, "Did not fetch the n histograms from ws group")

        # Test with single workspace as input
        nHistograms = quick.groupGet(mtd[self.__wsName][0].name(), 'wksp')
        self.assertEqual(expectedNHistograms, nHistograms, "Did not fetch the n histograms from ws")
예제 #6
0
    def test_groupGet_instrument(self):
        expectedInstrument = "POLREF"

        # Test with group workspace as input
        instrument = quick.groupGet(self.__wsName, 'inst')
        self.assertEqual(expectedInstrument, instrument.getName(), "Did not fetch the instrument from ws group")

        # Test with single workspace as input
        instrument = quick.groupGet(mtd[self.__wsName][0].name(), 'inst')
        self.assertEqual(expectedInstrument, instrument.getName(), "Did not fetch the instrument from ws")
    def test_groupGet_log_single_value(self):

        expectedNPeriods = 2

        # Test with group workspace as input
        nPeriods = quick.groupGet(self.__wsName, 'samp', 'nperiods')
        self.assertEqual(expectedNPeriods, nPeriods, "Did not fetch the number of periods from ws group")

        # Test with single workspace as input
        nPeriods = quick.groupGet(mtd[self.__wsName][0].name(), 'samp', 'nperiods')
        self.assertEqual(expectedNPeriods, nPeriods, "Did not fetch the number of periods from ws")
    def test_groupGet_instrument(self):

        expectedInstrument = "POLREF"

        # Test with group workspace as input
        instrument = quick.groupGet(self.__wsName, 'inst')
        self.assertEqual(expectedInstrument, instrument.getName(), "Did not fetch the instrument from ws group")

        # Test with single workspace as input
        instrument = quick.groupGet(mtd[self.__wsName][0].name(), 'inst')
        self.assertEqual(expectedInstrument, instrument.getName(), "Did not fetch the instrument from ws")
예제 #9
0
    def test_groupGet_multi_value_log(self):
        # Expected start theta, taken from the last value of the time series log.
        expectedStartTheta = 0.4903

        # Test with group workspace as input
        stheta = quick.groupGet(self.__wsName, 'samp', 'stheta')
        self.assertEqual(expectedStartTheta, round(float(stheta), 4))

        # Test with single workspace as input
        stheta = quick.groupGet(mtd[self.__wsName][0].name(), 'samp', 'stheta')
        self.assertEqual(expectedStartTheta, round(float(stheta), 4))
    def test_groupGet_multi_value_log(self):

        # Expected start theta, taken from the last value of the time series log.
        expectedStartTheta = 0.4903

        # Test with group workspace as input
        stheta = quick.groupGet(self.__wsName, 'samp', 'stheta')
        self.assertEqual(expectedStartTheta, round(float(stheta), 4))

        # Test with single workspace as input
        stheta = quick.groupGet(mtd[self.__wsName][0].name(), 'samp', 'stheta')
        self.assertEqual(expectedStartTheta, round(float(stheta), 4))