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 bcd9664 commit 38f7c1eCopy full SHA for 38f7c1e
changelog/11065.doc.rst
@@ -0,0 +1,3 @@
1
+Use pytestconfig instead of request.config in cache example
2
+
3
+to be consistent with the API documentation.
doc/en/how-to/cache.rst
@@ -213,12 +213,12 @@ across pytest invocations:
213
214
215
@pytest.fixture
216
- def mydata(request):
217
- val = request.config.cache.get("example/value", None)
+ def mydata(pytestconfig):
+ val = pytestconfig.cache.get("example/value", None)
218
if val is None:
219
expensive_computation()
220
val = 42
221
- request.config.cache.set("example/value", val)
+ pytestconfig.cache.set("example/value", val)
222
return val
223
224
0 commit comments