Skip to content

Commit a32c280

Browse files
authored
Actually, unset checks for the existence of the key.
1 parent 431d827 commit a32c280

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Lib/test/test_webbrowser.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,7 @@ def setUp(self):
326326
# Ensure that 'BROWSER' is not set to 'open' or something else.
327327
# See: https://github.com/python/cpython/issues/131254.
328328
env = self.enterContext(os_helper.EnvironmentVarGuard())
329-
if "BROWSER" in env:
330-
env.unset("BROWSER")
329+
env.unset("BROWSER")
331330

332331
support.patch(self, os, "popen", self.mock_popen)
333332
self.browser = webbrowser.MacOSXOSAScript("default")

0 commit comments

Comments
 (0)