From fa1cd6bd5ef63e3623e71debe3f218a6befdbc64 Mon Sep 17 00:00:00 2001 From: kbaikov Date: Sun, 22 Aug 2021 16:29:22 +0200 Subject: [PATCH] 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(): --- 23-dyn-attr-prop/oscon/test_schedule_v1.py | 2 +- 23-dyn-attr-prop/oscon/test_schedule_v2.py | 2 +- 23-dyn-attr-prop/oscon/test_schedule_v3.py | 2 +- 23-dyn-attr-prop/oscon/test_schedule_v4.py | 2 +- 23-dyn-attr-prop/oscon/test_schedule_v5.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/23-dyn-attr-prop/oscon/test_schedule_v1.py b/23-dyn-attr-prop/oscon/test_schedule_v1.py index 643f04f..cfd7dd0 100644 --- a/23-dyn-attr-prop/oscon/test_schedule_v1.py +++ b/23-dyn-attr-prop/oscon/test_schedule_v1.py @@ -3,7 +3,7 @@ import pytest import schedule_v1 as schedule -@pytest.yield_fixture +@pytest.fixture def records(): yield schedule.load(schedule.JSON_PATH) diff --git a/23-dyn-attr-prop/oscon/test_schedule_v2.py b/23-dyn-attr-prop/oscon/test_schedule_v2.py index a11b24d..e15d640 100644 --- a/23-dyn-attr-prop/oscon/test_schedule_v2.py +++ b/23-dyn-attr-prop/oscon/test_schedule_v2.py @@ -2,7 +2,7 @@ import pytest import schedule_v2 as schedule -@pytest.yield_fixture +@pytest.fixture def records(): yield schedule.load(schedule.JSON_PATH) diff --git a/23-dyn-attr-prop/oscon/test_schedule_v3.py b/23-dyn-attr-prop/oscon/test_schedule_v3.py index 1b7ea75..d9436d4 100644 --- a/23-dyn-attr-prop/oscon/test_schedule_v3.py +++ b/23-dyn-attr-prop/oscon/test_schedule_v3.py @@ -2,7 +2,7 @@ import pytest import schedule_v3 as schedule -@pytest.yield_fixture +@pytest.fixture def records(): yield schedule.load(schedule.JSON_PATH) diff --git a/23-dyn-attr-prop/oscon/test_schedule_v4.py b/23-dyn-attr-prop/oscon/test_schedule_v4.py index 1e5560a..4980bbd 100644 --- a/23-dyn-attr-prop/oscon/test_schedule_v4.py +++ b/23-dyn-attr-prop/oscon/test_schedule_v4.py @@ -2,7 +2,7 @@ import pytest import schedule_v4 as schedule -@pytest.yield_fixture +@pytest.fixture def records(): yield schedule.load(schedule.JSON_PATH) diff --git a/23-dyn-attr-prop/oscon/test_schedule_v5.py b/23-dyn-attr-prop/oscon/test_schedule_v5.py index 2151844..e3a5206 100644 --- a/23-dyn-attr-prop/oscon/test_schedule_v5.py +++ b/23-dyn-attr-prop/oscon/test_schedule_v5.py @@ -2,7 +2,7 @@ import pytest import schedule_v5 as schedule -@pytest.yield_fixture +@pytest.fixture def records(): yield schedule.load(schedule.JSON_PATH)