We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d1ae0a commit 25d2cc4Copy full SHA for 25d2cc4
_pytest/cacheprovider.py
@@ -186,8 +186,20 @@ def pytest_configure(config):
186
187
@pytest.fixture
188
def cache(request):
189
+ """
190
+ Return a cache object that can persist state between testing sessions.
191
+
192
+ cache.get(key, default)
193
+ cache.set(key, value)
194
195
+ Keys must be strings not containing a "/" separator. Add a unique identifier
196
+ (such as plugin/app name) to avoid clashes with other cache users.
197
198
+ Values can be any object handled by the json stdlib module.
199
200
return request.config.cache
201
202
203
def pytest_report_header(config):
204
if config.option.verbose:
205
relpath = py.path.local().bestrelpath(config.cache._cachedir)
0 commit comments