Skip to content
Snippets Groups Projects
Commit e13a5017 authored by Vermaat's avatar Vermaat
Browse files

Never load MUTALYZER_SETTINGS in tests

parent f46ba2b6
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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())
......
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