Unverified Commit 7b6eb20e authored by Peterson, Peter's avatar Peterson, Peter Committed by GitHub
Browse files

Merge pull request #30868 from mantidproject/empty_default_instrument

Empty default facility and instrument (ornlnext)
parents 8afa1cad dfef0c77
......@@ -9,6 +9,7 @@ import unittest
from isis_reflectometry import quick
from mantid.simpleapi import *
from mantid.kernel import ConfigService
class ReflectometryQuickAuxiliaryTest(unittest.TestCase):
......@@ -19,7 +20,9 @@ class ReflectometryQuickAuxiliaryTest(unittest.TestCase):
super(ReflectometryQuickAuxiliaryTest, self).__init__(methodName)
def setUp(self):
ConfigService.Instance().setString("default.facility", "ISIS")
LoadISISNexus(Filename='POLREF00004699', OutputWorkspace=self.__wsName)
ConfigService.Instance().setString("default.facility", " ")
def tearDown(self):
DeleteWorkspace(mtd[self.__wsName])
......
......@@ -8,7 +8,7 @@ import os
import unittest
from mantid.api import AnalysisDataService
from mantid.kernel import config
from mantid.kernel import config, ConfigService
from mantid.simpleapi import (CreateSampleWorkspace, MaskDetectors, DeleteWorkspace, LoadNexusProcessed, Load, Rebin)
from sans.algorithm_detail.calculate_transmission_helper import (get_masked_det_ids,
get_idf_path_from_workspace,
......@@ -34,7 +34,9 @@ class CalculateTransmissionHelperTest(unittest.TestCase):
@staticmethod
def _create_flat_background_test_workspace(workspace_name):
ConfigService.Instance().setString("default.facility", "ISIS")
LoadNexusProcessed(Filename="LOQ48127", OutputWorkspace=workspace_name)
ConfigService.Instance().setString("default.facility", " ")
workspace = AnalysisDataService.retrieve(workspace_name)
# Rebin to only have four values at 11, 31, 51, 70.5
workspace = Rebin(workspace, "1,20,80")
......@@ -61,6 +63,7 @@ class CalculateTransmissionHelperTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
ConfigService.Instance().setString("default.facility", "ISIS")
# A small workspace for general tests
test_workspace = LoadNexusProcessed(Filename="LOQ48127")
cls.immutable_test_workspace = test_workspace
......@@ -88,6 +91,7 @@ class CalculateTransmissionHelperTest(unittest.TestCase):
"\t</detector-masking>\n")
cls.mask_file_path = cls._get_path(cls.mask_file)
cls._save_file(cls.mask_file_path, mask_content)
ConfigService.Instance().setString("default.facility", " ")
@classmethod
def tearDownClass(cls):
......
Markdown is supported
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