diff --git a/tests/conftest.py b/tests/conftest.py index c59580d0b5be5b20c3035857a7c7fcc1732747bb..a555bb1e01b68dc2431364c9af368067a889eb77 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -5,6 +5,8 @@ Test configuration. from __future__ import unicode_literals +import mutalyzer.config + from disable_network import turn_off_network, turn_on_network from fixtures import * # noqa @@ -36,6 +38,10 @@ def pytest_generate_tests(metafunc): def pytest_configure(config): + # Make sure we cannot accidentally load configuration from the + # `MUTALYZER_SETTINGS` environment variable. + mutalyzer.config.ENVIRONMENT_VARIABLE = None + if not config.getoption('allow_network'): turn_off_network(verbose=config.option.verbose) diff --git a/tests/fixtures.py b/tests/fixtures.py index 870331f86254165a066d73258427eff5c3c2fbd4..f96a9c3a82c62d83e166d77265107ad79681f604 100644 --- a/tests/fixtures.py +++ b/tests/fixtures.py @@ -21,8 +21,6 @@ from mutalyzer import db as _db @pytest.fixture(autouse=True) def settings(request, tmpdir): - # This fixture should always be loaded, otherwise we have the risk that - # `MUTALYZER_SETTINGS` will be used. cache_dir = unicode(tmpdir.mkdir('cache')) log_file = unicode(tmpdir.join('log').ensure())