Minor updates
This commit is contained in:
parent
733264f7a4
commit
341d998eaa
4 changed files with 14 additions and 14 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -3,7 +3,7 @@
|
|||
*.gc*
|
||||
*.o
|
||||
*.py[cod]
|
||||
.cache
|
||||
.pytest_cache
|
||||
.tox
|
||||
__pycache__/
|
||||
build/
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
1
tox.ini
1
tox.ini
|
@ -3,7 +3,6 @@ envlist = py27,py36,gcov
|
|||
|
||||
[testenv]
|
||||
deps = -r{toxinidir}/requirements-dev.txt
|
||||
passenv = SSH_AUTH_SOCK
|
||||
commands =
|
||||
python -m pytest
|
||||
|
||||
|
|
Loading…
Reference in a new issue