diff --git a/swh/loader/mercurial/tests/conftest.py b/swh/loader/mercurial/tests/conftest.py --- a/swh/loader/mercurial/tests/conftest.py +++ b/swh/loader/mercurial/tests/conftest.py @@ -37,3 +37,12 @@ "max_content_size": 104857600, "temp_directory": str(tmp_path), } + + +@pytest.fixture(autouse=True) +def swh_mercurial_set_plain(monkeypatch): + """Mercurial is customizable by users, so we use built-in environment + variables to turn off all customization in tests. + """ + monkeypatch.setenv("HGPLAIN", "") + monkeypatch.setenv("HGRCPATH", "")