mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-15 20:26:04 +07:00
PY-34498 Add an inspection for pytest fixture that is not passed to test parameters
Report warning if a fixture is used without being passed to test function parameters or to `@pytest.mark.usefixtures` decorator. Co-authored-by: Denis Mashutin <Denis.Mashutin@jetbrains.com> Merge-request: IJ-MR-108713 Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com> GitOrigin-RevId: 28d0711b99ab7ae180f672306dd4ab8a81f1feec
This commit is contained in:
committed by
intellij-monorepo-bot
parent
42557af56d
commit
540f24faa4
@@ -0,0 +1,10 @@
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def foo():
|
||||
return 1
|
||||
|
||||
|
||||
def test_():
|
||||
assert <warning descr="Fixture 'foo' is not requested by test functions or @pytest.mark.usefixtures marker"><caret>foo</warning> == 1
|
||||
Reference in New Issue
Block a user