Skip to content

Commit 8e246ac

Browse files
authored
replace remaining (deprecated) yield_fixture with fixture (#1125)
1 parent 7205269 commit 8e246ac

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

tests/instrumentation/mysql_connector_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
pytestmark.append(pytest.mark.skip("Skipping mysql-connector tests, no MYSQL_HOST environment variable set"))
4545

4646

47-
@pytest.yield_fixture(scope="function")
47+
@pytest.fixture(scope="function")
4848
def mysql_connector_connection(request):
4949
conn = connector.connect(
5050
host=os.environ.get("MYSQL_HOST", "localhost"),

tests/instrumentation/mysqlclient_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
pytestmark.append(pytest.mark.skip("Skipping mysqlclient tests, no MYSQL_HOST environment variable set"))
4747

4848

49-
@pytest.yield_fixture(scope="function")
49+
@pytest.fixture(scope="function")
5050
def mysqlclient_connection(request):
5151
conn = mysqldb.connect(
5252
host=os.environ.get("MYSQL_HOST", "localhost"),

tests/instrumentation/psycopg2_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def connect_kwargs():
6969
}
7070

7171

72-
@pytest.yield_fixture(scope="function")
72+
@pytest.fixture(scope="function")
7373
def postgres_connection(request):
7474
conn = psycopg2.connect(**connect_kwargs())
7575
cursor = conn.cursor()

tests/instrumentation/pymssql_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
pytestmark.append(pytest.mark.skip("Skipping MS-SQL tests, no MSSQL_HOST environment variable set"))
4646

4747

48-
@pytest.yield_fixture(scope="function")
48+
@pytest.fixture(scope="function")
4949
def pymssql_connection(request):
5050
conn = pymssql.connect(
5151
os.environ.get("MSSQL_HOST", "localhost"),

tests/instrumentation/pymysql_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
pytestmark.append(pytest.mark.skip("Skipping pymysql tests, no MYSQL_HOST environment variable set"))
4444

4545

46-
@pytest.yield_fixture(scope="function")
46+
@pytest.fixture(scope="function")
4747
def pymysql_connection(request):
4848
conn = pymysql.connect(
4949
host=os.environ.get("MYSQL_HOST", "localhost"),

0 commit comments

Comments
 (0)