mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Debug unit tests
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user