diff --git a/_pytest/cacheprovider.py b/_pytest/cacheprovider.py index 5f7b476db..cff951fec 100755 --- a/_pytest/cacheprovider.py +++ b/_pytest/cacheprovider.py @@ -171,6 +171,10 @@ def pytest_configure(config): config.pluginmanager.register(LFPlugin(config), "lfplugin") +@pytest.fixture +def cache(request): + return request.config.cache + def pytest_report_header(config): if config.option.verbose: relpath = py.path.local().bestrelpath(config.cache._cachedir) diff --git a/testing/test_cache.py b/testing/test_cache.py index 9ec8966d7..9eedb7dc7 100755 --- a/testing/test_cache.py +++ b/testing/test_cache.py @@ -36,7 +36,7 @@ class TestNewAPI: assert result.ret == 0 result.stdout.fnmatch_lines(["*1 passed*"]) - def XXX_test_cachefuncarg(self, testdir): + def test_cachefuncarg(self, testdir): testdir.makepyfile(""" import pytest def test_cachefuncarg(cache):