Update the pytest dependency to the latest install.

This commit is contained in:
Dave Halter
2017-05-17 19:17:30 -04:00
parent 2beec09d77
commit 6dd466a8d5
2 changed files with 6 additions and 18 deletions

View File

@@ -8,20 +8,8 @@ from parso import cache
collect_ignore = ["setup.py"] collect_ignore = ["setup.py"]
def pytest_addoption(parser):
parser.addoption("--warning-is-error", action='store_true',
help="Warnings are treated as errors.")
def pytest_configure(config):
if config.option.warning_is_error:
import warnings
warnings.simplefilter("error")
@pytest.fixture(scope='session') @pytest.fixture(scope='session')
def clean_parso_cache(request): def clean_parso_cache():
""" """
Set the default cache directory to a temporary directory during tests. Set the default cache directory to a temporary directory during tests.
@@ -35,7 +23,6 @@ def clean_parso_cache(request):
tmp = tempfile.mkdtemp(prefix='parso-test-') tmp = tempfile.mkdtemp(prefix='parso-test-')
cache._default_cache_path = tmp cache._default_cache_path = tmp
@request.addfinalizer yield
def restore():
cache._default_cache_path = old cache._default_cache_path = old
shutil.rmtree(tmp) shutil.rmtree(tmp)

View File

@@ -2,7 +2,8 @@
envlist = py26, py27, py33, py34, py35, py36 envlist = py26, py27, py33, py34, py35, py36
[testenv] [testenv]
deps = deps =
pytest>=2.3.5 pytest>=3.0.7
# For --lf and --ff.
pytest-cache pytest-cache
setenv = setenv =
# https://github.com/tomchristie/django-rest-framework/issues/1957 # https://github.com/tomchristie/django-rest-framework/issues/1957