summaryrefslogtreecommitdiff
path: root/pkg_resources/tests/test_resources.py
diff options
context:
space:
mode:
authorChih-Hsuan Yen <yan12125@gmail.com>2020-12-13 18:01:50 +0800
committerChih-Hsuan Yen <yan12125@gmail.com>2020-12-13 18:27:23 +0800
commit701eee9e53dcbfe200bef46420da420052699e68 (patch)
tree57dcd5a8b082014dd8e0b42ac3fa60f120a7b1da /pkg_resources/tests/test_resources.py
parentd368be2b5be8676ba8a3d55045b45b55090f6982 (diff)
downloadpython-setuptools-git-701eee9e53dcbfe200bef46420da420052699e68.tar.gz
Fix tests with pytest 6.2
The latest pytest deprecates pytest.yield_fixture in favor of pytest.fixture [1]. The changelog [2] says that both are the same. [1] https://github.com/pytest-dev/pytest/pull/7988 [2] https://docs.pytest.org/en/stable/changelog.html#pytest-6-2-0-2020-12-12
Diffstat (limited to 'pkg_resources/tests/test_resources.py')
-rw-r--r--pkg_resources/tests/test_resources.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py
index b08bb293..965a7c00 100644
--- a/pkg_resources/tests/test_resources.py
+++ b/pkg_resources/tests/test_resources.py
@@ -773,7 +773,7 @@ class TestNamespaces:
ns_str = "__import__('pkg_resources').declare_namespace(__name__)\n"
- @pytest.yield_fixture
+ @pytest.fixture
def symlinked_tmpdir(self, tmpdir):
"""
Where available, return the tempdir as a symlink,
@@ -791,7 +791,7 @@ class TestNamespaces:
finally:
os.unlink(link_name)
- @pytest.yield_fixture(autouse=True)
+ @pytest.fixture(autouse=True)
def patched_path(self, tmpdir):
"""
Patch sys.path to include the 'site-pkgs' dir. Also