From 2e87cf4a624ffd8f48e86a9bda204309ed010ba1 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Fri, 24 Jul 2015 20:32:50 +0200 Subject: [PATCH] create the previously missing cache fixture there was a disabled test --- _pytest/cacheprovider.py | 4 ++++ testing/test_cache.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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):