summaryrefslogtreecommitdiff
path: root/setuptools/tests/test_msvc.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 /setuptools/tests/test_msvc.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 'setuptools/tests/test_msvc.py')
-rw-r--r--setuptools/tests/test_msvc.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/setuptools/tests/test_msvc.py b/setuptools/tests/test_msvc.py
index 24e38ea8..d1527bfa 100644
--- a/setuptools/tests/test_msvc.py
+++ b/setuptools/tests/test_msvc.py
@@ -88,7 +88,7 @@ class TestModulePatch:
assert isinstance(exc, expected)
assert 'aka.ms/vcpython27' in str(exc)
- @pytest.yield_fixture
+ @pytest.fixture
def user_preferred_setting(self):
"""
Set up environment with different install dirs for user vs. system
@@ -116,7 +116,7 @@ class TestModulePatch:
expected = os.path.join(user_preferred_setting, 'vcvarsall.bat')
assert expected == result
- @pytest.yield_fixture
+ @pytest.fixture
def local_machine_setting(self):
"""
Set up environment with only the system environment configured.
@@ -138,7 +138,7 @@ class TestModulePatch:
expected = os.path.join(local_machine_setting, 'vcvarsall.bat')
assert expected == result
- @pytest.yield_fixture
+ @pytest.fixture
def x64_preferred_setting(self):
"""
Set up environment with 64-bit and 32-bit system settings configured