From 8d5adeb9cff947aeb9baf8265db77fb2507096c4 Mon Sep 17 00:00:00 2001 From: Hai Shi Date: Mon, 21 Aug 2023 16:57:37 +0800 Subject: [PATCH] =?UTF-8?q?Update=202023-07-17-pytest=E5=AD=A6=E4=B9=A0.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "_posts/2023-07-17-pytest\345\255\246\344\271\240.md" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git "a/_posts/2023-07-17-pytest\345\255\246\344\271\240.md" "b/_posts/2023-07-17-pytest\345\255\246\344\271\240.md" index 9b2cce9..6f944e9 100644 --- "a/_posts/2023-07-17-pytest\345\255\246\344\271\240.md" +++ "b/_posts/2023-07-17-pytest\345\255\246\344\271\240.md" @@ -150,7 +150,7 @@ class FixtureRequest(abc.ABC): ... ``` 在上面的`FixtureRequest.getfixturevalue()`函数中有一个逻辑是返回`fixturedef.cached_result`,实际这个执行逻辑在: -``` +```python def pytest_fixture_setup( fixturedef: FixtureDef[FixtureValue], request: SubRequest ) -> FixtureValue: