Use fixture instead of yield_fixture
The old @pytest.yield_fixture causes
a deprecation warning:
Use @pytest.fixture instead; they are the same.
def records():
This commit is contained in:
@@ -3,7 +3,7 @@ import pytest
|
|||||||
import schedule_v1 as schedule
|
import schedule_v1 as schedule
|
||||||
|
|
||||||
|
|
||||||
@pytest.yield_fixture
|
@pytest.fixture
|
||||||
def records():
|
def records():
|
||||||
yield schedule.load(schedule.JSON_PATH)
|
yield schedule.load(schedule.JSON_PATH)
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import pytest
|
|||||||
|
|
||||||
import schedule_v2 as schedule
|
import schedule_v2 as schedule
|
||||||
|
|
||||||
@pytest.yield_fixture
|
@pytest.fixture
|
||||||
def records():
|
def records():
|
||||||
yield schedule.load(schedule.JSON_PATH)
|
yield schedule.load(schedule.JSON_PATH)
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import pytest
|
|||||||
|
|
||||||
import schedule_v3 as schedule
|
import schedule_v3 as schedule
|
||||||
|
|
||||||
@pytest.yield_fixture
|
@pytest.fixture
|
||||||
def records():
|
def records():
|
||||||
yield schedule.load(schedule.JSON_PATH)
|
yield schedule.load(schedule.JSON_PATH)
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import pytest
|
|||||||
|
|
||||||
import schedule_v4 as schedule
|
import schedule_v4 as schedule
|
||||||
|
|
||||||
@pytest.yield_fixture
|
@pytest.fixture
|
||||||
def records():
|
def records():
|
||||||
yield schedule.load(schedule.JSON_PATH)
|
yield schedule.load(schedule.JSON_PATH)
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import pytest
|
|||||||
|
|
||||||
import schedule_v5 as schedule
|
import schedule_v5 as schedule
|
||||||
|
|
||||||
@pytest.yield_fixture
|
@pytest.fixture
|
||||||
def records():
|
def records():
|
||||||
yield schedule.load(schedule.JSON_PATH)
|
yield schedule.load(schedule.JSON_PATH)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user