Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mutalyzer
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirrors
mutalyzer
Commits
f4b7d13e
Commit
f4b7d13e
authored
9 years ago
by
Vermaat
Browse files
Options
Downloads
Plain Diff
Merge pull request #98 from mutalyzer/fix-test-config
Never load MUTALYZER_SETTINGS in tests
parents
f46ba2b6
e13a5017
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/conftest.py
+6
-0
6 additions, 0 deletions
tests/conftest.py
tests/fixtures.py
+0
-2
0 additions, 2 deletions
tests/fixtures.py
with
6 additions
and
2 deletions
tests/conftest.py
+
6
−
0
View file @
f4b7d13e
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
tests/fixtures.py
+
0
−
2
View file @
f4b7d13e
...
...
@@ -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
())
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment