Commit d99128a2 authored by Owen Arnold's avatar Owen Arnold
Browse files

refs #7472. Fix errors in unit test.

parent 516cb690
...@@ -27,7 +27,7 @@ class ReflectometryQuickAuxiliaryTest(unittest.TestCase): ...@@ -27,7 +27,7 @@ class ReflectometryQuickAuxiliaryTest(unittest.TestCase):
# Should remove workspaces starting with _ # Should remove workspaces starting with _
quick.cleanup() quick.cleanup()
cleaned_object_names = mtd.getObjectNames() cleaned_object_names = mtd.getObjectNames()
self.assertEqual(1, len(cleaned_object_names)) self.assertEqual(numObjectsOriginal+1, len(cleaned_object_names))
self.assertEqual(True, ('tokeep' in cleaned_object_names)) self.assertEqual(True, ('tokeep' in cleaned_object_names))
DeleteWorkspace(tokeep) DeleteWorkspace(tokeep)
...@@ -82,7 +82,6 @@ class ReflectometryQuickAuxiliaryTest(unittest.TestCase): ...@@ -82,7 +82,6 @@ class ReflectometryQuickAuxiliaryTest(unittest.TestCase):
instrument = quick.groupGet(mtd[self.__wsName][0].name(), 'inst') instrument = quick.groupGet(mtd[self.__wsName][0].name(), 'inst')
self.assertEquals(expectedInstrument, instrument.getName(), "Did not fetch the instrument from ws") self.assertEquals(expectedInstrument, instrument.getName(), "Did not fetch the instrument from ws")
DeleteWorkspace(mtd[wsName])
def test_groupGet_histogram_count(self): def test_groupGet_histogram_count(self):
expectedNHistograms = mtd[self.__wsName][0].getNumberHistograms() expectedNHistograms = mtd[self.__wsName][0].getNumberHistograms()
...@@ -101,15 +100,13 @@ class ReflectometryQuickAuxiliaryTest(unittest.TestCase): ...@@ -101,15 +100,13 @@ class ReflectometryQuickAuxiliaryTest(unittest.TestCase):
expectedNPeriods = 2 expectedNPeriods = 2
# Test with group workspace as input # Test with group workspace as input
nPeriods = quick.groupGet(wsName, 'samp', 'nperiods') nPeriods = quick.groupGet(self.__wsName, 'samp', 'nperiods')
self.assertEquals(expectedNPeriods, nPeriods, "Did not fetch the number of periods from ws group") self.assertEquals(expectedNPeriods, nPeriods, "Did not fetch the number of periods from ws group")
# Test with single workspace as input # Test with single workspace as input
nPeriods = quick.groupGet(mtd[wsName][0].name(), 'samp', 'nperiods') nPeriods = quick.groupGet(mtd[self.__wsName][0].name(), 'samp', 'nperiods')
self.assertEquals(expectedNPeriods, nPeriods, "Did not fetch the number of periods from ws") self.assertEquals(expectedNPeriods, nPeriods, "Did not fetch the number of periods from ws")
DeleteWorkspace(mtd[self.__wsName])
def test_groupGet_multi_value_log(self): def test_groupGet_multi_value_log(self):
# Expected start theta, taken from the last value of the time series log. # Expected start theta, taken from the last value of the time series log.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment