aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_platform.py
diff options
context:
space:
mode:
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>2025-03-16 14:09:33 +0100
committerGitHub <noreply@github.com>2025-03-16 14:09:33 +0100
commit3185e3115c918ec189e16cf9f5b51a13a0146556 (patch)
tree4a773847ee275359ae58832afea1071858e539af /Lib/test/test_platform.py
parent9558d22ac308c102e4f843541eead2022050225e (diff)
downloadcpython-3185e3115c918ec189e16cf9f5b51a13a0146556.tar.gz
cpython-3185e3115c918ec189e16cf9f5b51a13a0146556.zip
gh-131277: allow `EnvironmentVarGuard` to unset more than one environment variable at once (#131280)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Diffstat (limited to 'Lib/test/test_platform.py')
-rw-r--r--Lib/test/test_platform.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py
index e04ad142061..ca73b043d31 100644
--- a/Lib/test/test_platform.py
+++ b/Lib/test/test_platform.py
@@ -368,8 +368,7 @@ class PlatformTest(unittest.TestCase):
with support.swap_attr(platform, '_wmi_query', raises_oserror):
with os_helper.EnvironmentVarGuard() as environ:
try:
- if 'PROCESSOR_ARCHITEW6432' in environ:
- del environ['PROCESSOR_ARCHITEW6432']
+ del environ['PROCESSOR_ARCHITEW6432']
environ['PROCESSOR_ARCHITECTURE'] = 'foo'
platform._uname_cache = None
system, node, release, version, machine, processor = platform.uname()