test_ok1/pytest_stepwise/compat.py

13 lines
241 B
Python

import pytest
try:
from _pytest.cacheprovider import Cache
except ImportError:
from pytest_cache import Cache
if hasattr(pytest, 'hookimpl'):
tryfirst = pytest.hookimpl(tryfirst=True)
else:
tryfirst = pytest.mark.tryfirst