diff --git a/lib/galaxy/config/__init__.py b/lib/galaxy/config/__init__.py index 96c2a63023e..8a8d0fc9f5a 100644 --- a/lib/galaxy/config/__init__.py +++ b/lib/galaxy/config/__init__.py @@ -707,6 +707,7 @@ class GalaxyAppConfiguration(BaseAppConfiguration, CommonConfigurationMixin): def _override_tempdir(self, kwargs): if string_as_bool(kwargs.get("override_tempdir", "True")): + raise Exception("How did we get here ?") tempfile.tempdir = self.new_file_path def config_value_for_host(self, config_option, host): diff --git a/test/unit/webapps/test_config_values.py b/test/unit/webapps/test_config_values.py index bd2e1fe0631..24f922cee46 100644 --- a/test/unit/webapps/test_config_values.py +++ b/test/unit/webapps/test_config_values.py @@ -18,10 +18,6 @@ def appconfig(): @pytest.fixture def mock_config_file(monkeypatch): - # Patch this; otherwise tempfile.tempdir will be set, which is a global variable that - # defines the value of the default `dir` argument to the functions in Python's - # tempfile module - which breaks multiple tests. - monkeypatch.setattr(config.GalaxyAppConfiguration, '_override_tempdir', lambda a, b: None) # Set this to return None to force the creation of base config directories # in _set_config_directories(). Used to test the values of these directories only. monkeypatch.setattr(config, 'find_config_file', lambda x: None)