Skip to content

Commit

Permalink
Minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
asottile committed May 16, 2018
1 parent 733264f commit 341d998
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*.gc*
*.o
*.py[cod]
.cache
.pytest_cache
.tox
__pycache__/
build/
Expand Down
13 changes: 7 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
- repo: https://github.com/pre-commit/pre-commit-hooks.git
sha: v0.9.1
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v1.2.3
hooks:
- id: autopep8-wrapper
- id: check-added-large-files
Expand All @@ -15,11 +16,11 @@
- id: name-tests-test
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/reorder_python_imports.git
sha: v0.3.5
- repo: https://github.com/asottile/reorder_python_imports
rev: v1.0.1
hooks:
- id: reorder-python-imports
- repo: https://github.com/Lucas-C/pre-commit-hooks.git
sha: v1.0.1
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.5
hooks:
- id: remove-tabs
12 changes: 6 additions & 6 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pytest


@pytest.yield_fixture(autouse=True, scope='function')
@pytest.fixture(autouse=True, scope='function')
def clean_environment():
"""Ensure all tests start with a clean environment.
Expand All @@ -18,31 +18,31 @@ def clean_environment():
yield


@pytest.yield_fixture(params=['1', '0'])
@pytest.fixture(params=['1', '0'])
def both_debug_modes(request):
with mock.patch.dict(os.environ, {'DUMB_INIT_DEBUG': request.param}):
yield


@pytest.yield_fixture
@pytest.fixture
def debug_disabled():
with mock.patch.dict(os.environ, {'DUMB_INIT_DEBUG': '0'}):
yield


@pytest.yield_fixture(params=['1', '0'])
@pytest.fixture(params=['1', '0'])
def both_setsid_modes(request):
with mock.patch.dict(os.environ, {'DUMB_INIT_SETSID': request.param}):
yield


@pytest.yield_fixture
@pytest.fixture
def setsid_enabled():
with mock.patch.dict(os.environ, {'DUMB_INIT_SETSID': '1'}):
yield


@pytest.yield_fixture
@pytest.fixture
def setsid_disabled():
with mock.patch.dict(os.environ, {'DUMB_INIT_SETSID': '0'}):
yield
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ envlist = py27,py36,gcov

[testenv]
deps = -r{toxinidir}/requirements-dev.txt
passenv = SSH_AUTH_SOCK
commands =
python -m pytest

Expand Down

0 comments on commit 341d998

Please sign in to comment.