From 6dd466a8d5251ed848fb513f7cd0b9a454372684 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Wed, 17 May 2017 19:17:30 -0400 Subject: [PATCH] Update the pytest dependency to the latest install. --- conftest.py | 21 ++++----------------- tox.ini | 3 ++- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/conftest.py b/conftest.py index 83a120f..7438fbf 100644 --- a/conftest.py +++ b/conftest.py @@ -8,20 +8,8 @@ from parso import cache 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') -def clean_parso_cache(request): +def clean_parso_cache(): """ 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-') cache._default_cache_path = tmp - @request.addfinalizer - def restore(): - cache._default_cache_path = old - shutil.rmtree(tmp) + yield + cache._default_cache_path = old + shutil.rmtree(tmp) diff --git a/tox.ini b/tox.ini index 8c1bc5d..edfba82 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,8 @@ envlist = py26, py27, py33, py34, py35, py36 [testenv] deps = - pytest>=2.3.5 + pytest>=3.0.7 +# For --lf and --ff. pytest-cache setenv = # https://github.com/tomchristie/django-rest-framework/issues/1957