---
source: crates/ruff/src/rules/flake8_pytest_style/mod.rs
---
PT022.py:17:5: PT022 [*] No teardown in fixture `error`, use `return` instead of `yield`
   |
17 | def error():
18 |     resource = acquire_resource()
19 |     yield resource
   |     ^^^^^^^^^^^^^^ PT022
   |
   = help: Replace `yield` with `return`

ℹ Suggested fix
14 14 | @pytest.fixture()
15 15 | def error():
16 16 |     resource = acquire_resource()
17    |-    yield resource
   17 |+    return resource


