diff --git a/tests/test_wheel.py b/tests/test_wheel.py index 55c835ab9..ac13ce113 100644 --- a/tests/test_wheel.py +++ b/tests/test_wheel.py @@ -247,7 +247,7 @@ def test_purelib_platlib_split(package_purelib_platlib_split, tmp_path): @pytest.mark.skipif(sys.platform != 'darwin', reason='macOS specific test') -@pytest.mark.parametrize(('arch'), ['x86_64', 'arm64']) +@pytest.mark.parametrize('arch', ['x86_64', 'arm64']) def test_archflags_envvar(package_purelib_and_platlib, monkeypatch, tmp_path, arch): try: monkeypatch.setenv('ARCHFLAGS', f'-arch {arch}') @@ -256,8 +256,7 @@ def test_archflags_envvar(package_purelib_and_platlib, monkeypatch, tmp_path, ar assert name.group('plat').endswith(arch) finally: # revert environment variable setting done by the in-process build - if '_PYTHON_HOST_PLATFORM' in os.environ: - del os.environ['_PYTHON_HOST_PLATFORM'] + os.environ.pop('_PYTHON_HOST_PLATFORM', None) def test_subprojects(package_subproject, tmp_path):