mirror of
https://github.com/github/codeql.git
synced 2026-04-25 08:45:14 +02:00
Python: Also test pytest fixture factories
This commit is contained in:
@@ -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. |
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user