Debug unit tests

This commit is contained in:
mvdbeek
2022-03-01 15:39:48 +01:00
parent 3acb731214
commit 9ec7e878bc
2 changed files with 1 additions and 4 deletions
+1
View File
@@ -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):
-4
View File
@@ -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)