All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH] test: Update test_fs to not use deprecated pytest.yield_fixture()
Date: Thu, 28 Jan 2021 14:39:56 -0500	[thread overview]
Message-ID: <20210128193956.30928-1-trini@konsulko.com> (raw)

As noted in comments, yield_fixture has been deprecated for longer than
our minimum required version of pytest.  Newer versions of pytest cause
this to be a louder warning, and as the migration is trivial, perform it
now.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 test/py/tests/test_fs/conftest.py | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/test/py/tests/test_fs/conftest.py b/test/py/tests/test_fs/conftest.py
index 58e8cd46ee2c..ec70e8c4ef3f 100644
--- a/test/py/tests/test_fs/conftest.py
+++ b/test/py/tests/test_fs/conftest.py
@@ -243,8 +243,7 @@ def umount_fs(mount_point):
 # Fixture for basic fs test
 #     derived from test/fs/fs-test.sh
 #
-# NOTE: yield_fixture was deprecated since pytest-3.0
- at pytest.yield_fixture()
+ at pytest.fixture()
 def fs_obj_basic(request, u_boot_config):
     """Set up a file system to be used in basic fs test.
 
@@ -352,8 +351,7 @@ def fs_obj_basic(request, u_boot_config):
 #
 # Fixture for extended fs test
 #
-# NOTE: yield_fixture was deprecated since pytest-3.0
- at pytest.yield_fixture()
+ at pytest.fixture()
 def fs_obj_ext(request, u_boot_config):
     """Set up a file system to be used in extended fs test.
 
@@ -439,8 +437,7 @@ def fs_obj_ext(request, u_boot_config):
 #
 # Fixture for mkdir test
 #
-# NOTE: yield_fixture was deprecated since pytest-3.0
- at pytest.yield_fixture()
+ at pytest.fixture()
 def fs_obj_mkdir(request, u_boot_config):
     """Set up a file system to be used in mkdir test.
 
@@ -472,8 +469,7 @@ def fs_obj_mkdir(request, u_boot_config):
 #
 # Fixture for unlink test
 #
-# NOTE: yield_fixture was deprecated since pytest-3.0
- at pytest.yield_fixture()
+ at pytest.fixture()
 def fs_obj_unlink(request, u_boot_config):
     """Set up a file system to be used in unlink test.
 
@@ -538,8 +534,7 @@ def fs_obj_unlink(request, u_boot_config):
 #
 # Fixture for symlink fs test
 #
-# NOTE: yield_fixture was deprecated since pytest-3.0
- at pytest.yield_fixture()
+ at pytest.fixture()
 def fs_obj_symlink(request, u_boot_config):
     """Set up a file system to be used in symlink fs test.
 
-- 
2.17.1

             reply	other threads:[~2021-01-28 19:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-28 19:39 Tom Rini [this message]
2021-01-30 19:22 ` [PATCH] test: Update test_fs to not use deprecated pytest.yield_fixture() Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210128193956.30928-1-trini@konsulko.com \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.