Minor updates

This commit is contained in:
Anthony Sottile 2018-05-15 20:40:27 -07:00
parent 733264f7a4
commit 341d998eaa
4 changed files with 14 additions and 14 deletions

2
.gitignore vendored
View file

@ -3,7 +3,7 @@
*.gc*
*.o
*.py[cod]
.cache
.pytest_cache
.tox
__pycache__/
build/

View file

@ -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
@ -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

View file

@ -4,7 +4,7 @@ import mock
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.
@ -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

View file

@ -3,7 +3,6 @@ envlist = py27,py36,gcov
[testenv]
deps = -r{toxinidir}/requirements-dev.txt
passenv = SSH_AUTH_SOCK
commands =
python -m pytest