mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-06 12:54:29 +08:00
Update the pytest dependency to the latest install.
This commit is contained in:
21
conftest.py
21
conftest.py
@@ -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)
|
|
||||||
|
|||||||
3
tox.ini
3
tox.ini
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user