mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-13 17:18:55 +08:00
Recognize asynchronous pytest fixtures
This commit is contained in:
1 parent
2e3e905707
commit
d8efff8e30
4 files changed
+46
-1
No files matched your search
@@ -208,3 +208,41 @@ def bla(admin_u
|
||||
def bla(admin_user):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
# -----------------
|
||||
# asynchronous fixtures
|
||||
# -----------------
|
||||
|
||||
@pytest.fixture
|
||||
async def async_fixture():
|
||||
return 1
|
||||
|
||||
|
||||
@pytest.fixture(scope='module')
|
||||
async def async_annotated_fixture() -> str:
|
||||
return ''
|
||||
|
||||
|
||||
@fixture
|
||||
async def async_yield_fixture():
|
||||
yield 1.0
|
||||
|
||||
|
||||
#? ['async_fixture']
|
||||
def test_async_fixture_completion(async_fixt
|
||||
pass
|
||||
|
||||
|
||||
def test_async_fixture_inference(async_fixture, async_annotated_fixture, async_yield_fixture):
|
||||
#? int()
|
||||
async_fixture
|
||||
#? str()
|
||||
async_annotated_fixture
|
||||
#? float()
|
||||
async_yield_fixture
|
||||
|
||||
|
||||
#! 30 ['def async_fixture']
|
||||
def test_async_fixture_goto(async_fixture):
|
||||
pass
|
||||
Reference in new issue
Block a user