add compat for pytest 3.7 and tox config for (some of) the versions i could still get working
This commit is contained in:
parent
bd9495486b
commit
d9c428c1de
|
@ -5,6 +5,12 @@ try:
|
|||
except ImportError:
|
||||
from pytest_cache import Cache
|
||||
|
||||
try:
|
||||
# pytest 3.7+
|
||||
Cache = Cache.for_config
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
|
||||
if hasattr(pytest, 'hookimpl'):
|
||||
tryfirst = pytest.hookimpl(tryfirst=True)
|
||||
|
|
|
@ -132,4 +132,7 @@ def test_stop_on_collection_errors(broken_testdir):
|
|||
result = broken_testdir.runpytest('-v', '--strict', '--stepwise', 'working_testfile.py', 'broken_testfile.py')
|
||||
|
||||
stdout = result.stdout.str()
|
||||
assert 'Error when collecting test' in stdout
|
||||
if pytest.__version__ < '3.0.0':
|
||||
assert 'Error when collecting test' in stdout
|
||||
else:
|
||||
assert 'errors during collection' in stdout
|
||||
|
|
Loading…
Reference in New Issue