Skip to content
Snippets Groups Projects
Commit af5ecee9 authored by David Douard's avatar David Douard
Browse files

test: fix test_load_from_envvar

Make it immune to an existing SWH_CONFIG_FILENAME.
parent c044c25b
No related branches found
No related tags found
1 merge request!395Improve 'swh db' commands for easier usage in test environments and better consistency
......@@ -326,9 +326,9 @@ def test_merge_config_type_error():
config.merge_configs({"a": {}}, {"a": v})
def test_load_from_envvar_no_environment_var_swh_config_filename_set():
def test_load_from_envvar_no_environment_var_swh_config_filename_set(monkeypatch):
"""Without SWH_CONFIG_FILENAME set, load_from_envvar raises"""
monkeypatch.delenv("SWH_CONFIG_FILENAME", raising=False)
with pytest.raises(AssertionError, match="SWH_CONFIG_FILENAME environment"):
config.load_from_envvar()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment