Make yield pytest fixtures work

This commit is contained in:
Dave Halter
2019-12-27 01:50:17 +01:00
parent c45c8ec8ef
commit 148fffae28
3 changed files with 37 additions and 7 deletions

View File

@@ -13,14 +13,25 @@ def my_simple_fixture():
return 1
@fixture
def my_yield_fixture():
yield 1
@fixture
class MyClassFixture():
pass
# -----------------
# goto/infer
# -----------------
#! 18 'def my_conftest_fixture'
def test_x(my_conftest_fixture, my_fixture, my_not_existing_fixture):
#! 18 ['def my_conftest_fixture']
def test_x(my_conftest_fixture, my_fixture, my_not_existing_fixture, my_yield_fixture):
#? str()
my_fixture
#? int()
my_yield_fixture
#?
my_not_existing_fixture
#? float()
@@ -30,6 +41,12 @@ def test_x(my_conftest_fixture, my_fixture, my_not_existing_fixture):
def test_x(my_conftest_fixture, my_fixture):
pass
#! 18 ['param MyClassFixture']
def test_x(MyClassFixture):
#?
MyClassFixture
# -----------------
# completion
# -----------------