Python: Also test pytest fixture factories

This commit is contained in:
Taus
2024-06-14 13:10:31 +00:00
parent 78729180ad
commit 2f00a0d323
3 changed files with 9 additions and 2 deletions

View File

@@ -5,4 +5,5 @@
| imports_test.py:10:1:10:22 | Import | Import of 'top_level_cycle' is not used. |
| imports_test.py:27:1:27:25 | Import | Import of 'func2' is not used. |
| imports_test.py:34:1:34:14 | Import | Import of 'module2' is not used. |
| imports_test.py:116:1:116:67 | Import | Import of 'not_a_fixture' is not used. |
| imports_test.py:116:1:116:85 | Import | Import of 'fixture_instance' is not used. |
| imports_test.py:116:1:116:85 | Import | Import of 'not_a_fixture' is not used. |

View File

@@ -113,4 +113,4 @@ def baz() -> Optional['subexpression_return_type']:
pass
from pytest_fixtures import fixture, wrapped_fixture, not_a_fixture
from pytest_fixtures import fixture, wrapped_fixture, fixture_instance, not_a_fixture

View File

@@ -15,5 +15,11 @@ def fixture_wrapper():
def wrapped_fixture():
pass
@pytest.fixture(scope='session', autorun=True)
def factory_fixture():
pass
fixture_instance = factory_fixture()
def not_a_fixture():
pass