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*
|
*.gc*
|
||||||
*.o
|
*.o
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
.cache
|
.pytest_cache
|
||||||
.tox
|
.tox
|
||||||
__pycache__/
|
__pycache__/
|
||||||
build/
|
build/
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks.git
|
repos:
|
||||||
sha: v0.9.1
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v1.2.3
|
||||||
hooks:
|
hooks:
|
||||||
- id: autopep8-wrapper
|
- id: autopep8-wrapper
|
||||||
- id: check-added-large-files
|
- id: check-added-large-files
|
||||||
|
@ -15,11 +16,11 @@
|
||||||
- id: name-tests-test
|
- id: name-tests-test
|
||||||
- id: requirements-txt-fixer
|
- id: requirements-txt-fixer
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
- repo: https://github.com/asottile/reorder_python_imports.git
|
- repo: https://github.com/asottile/reorder_python_imports
|
||||||
sha: v0.3.5
|
rev: v1.0.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: reorder-python-imports
|
- id: reorder-python-imports
|
||||||
- repo: https://github.com/Lucas-C/pre-commit-hooks.git
|
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
||||||
sha: v1.0.1
|
rev: v1.1.5
|
||||||
hooks:
|
hooks:
|
||||||
- id: remove-tabs
|
- id: remove-tabs
|
||||||
|
|
|
@ -4,7 +4,7 @@ import mock
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
@pytest.yield_fixture(autouse=True, scope='function')
|
@pytest.fixture(autouse=True, scope='function')
|
||||||
def clean_environment():
|
def clean_environment():
|
||||||
"""Ensure all tests start with a clean environment.
|
"""Ensure all tests start with a clean environment.
|
||||||
|
|
||||||
|
@ -18,31 +18,31 @@ def clean_environment():
|
||||||
yield
|
yield
|
||||||
|
|
||||||
|
|
||||||
@pytest.yield_fixture(params=['1', '0'])
|
@pytest.fixture(params=['1', '0'])
|
||||||
def both_debug_modes(request):
|
def both_debug_modes(request):
|
||||||
with mock.patch.dict(os.environ, {'DUMB_INIT_DEBUG': request.param}):
|
with mock.patch.dict(os.environ, {'DUMB_INIT_DEBUG': request.param}):
|
||||||
yield
|
yield
|
||||||
|
|
||||||
|
|
||||||
@pytest.yield_fixture
|
@pytest.fixture
|
||||||
def debug_disabled():
|
def debug_disabled():
|
||||||
with mock.patch.dict(os.environ, {'DUMB_INIT_DEBUG': '0'}):
|
with mock.patch.dict(os.environ, {'DUMB_INIT_DEBUG': '0'}):
|
||||||
yield
|
yield
|
||||||
|
|
||||||
|
|
||||||
@pytest.yield_fixture(params=['1', '0'])
|
@pytest.fixture(params=['1', '0'])
|
||||||
def both_setsid_modes(request):
|
def both_setsid_modes(request):
|
||||||
with mock.patch.dict(os.environ, {'DUMB_INIT_SETSID': request.param}):
|
with mock.patch.dict(os.environ, {'DUMB_INIT_SETSID': request.param}):
|
||||||
yield
|
yield
|
||||||
|
|
||||||
|
|
||||||
@pytest.yield_fixture
|
@pytest.fixture
|
||||||
def setsid_enabled():
|
def setsid_enabled():
|
||||||
with mock.patch.dict(os.environ, {'DUMB_INIT_SETSID': '1'}):
|
with mock.patch.dict(os.environ, {'DUMB_INIT_SETSID': '1'}):
|
||||||
yield
|
yield
|
||||||
|
|
||||||
|
|
||||||
@pytest.yield_fixture
|
@pytest.fixture
|
||||||
def setsid_disabled():
|
def setsid_disabled():
|
||||||
with mock.patch.dict(os.environ, {'DUMB_INIT_SETSID': '0'}):
|
with mock.patch.dict(os.environ, {'DUMB_INIT_SETSID': '0'}):
|
||||||
yield
|
yield
|
||||||
|
|
1
tox.ini
1
tox.ini
|
@ -3,7 +3,6 @@ envlist = py27,py36,gcov
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps = -r{toxinidir}/requirements-dev.txt
|
deps = -r{toxinidir}/requirements-dev.txt
|
||||||
passenv = SSH_AUTH_SOCK
|
|
||||||
commands =
|
commands =
|
||||||
python -m pytest
|
python -m pytest
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue