mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
gh-131254: ensure that BROWSER is not set for test_webbrowser on macOS (#131276)
This commit is contained in:
parent
3185e3115c
commit
9b6cef0f5d
1 changed files with 6 additions and 0 deletions
|
|
@ -321,7 +321,13 @@ def close(self):
|
|||
@unittest.skipUnless(sys.platform == "darwin", "macOS specific test")
|
||||
@requires_subprocess()
|
||||
class MacOSXOSAScriptTest(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
# Ensure that 'BROWSER' is not set to 'open' or something else.
|
||||
# See: https://github.com/python/cpython/issues/131254.
|
||||
env = self.enterContext(os_helper.EnvironmentVarGuard())
|
||||
env.unset("BROWSER")
|
||||
|
||||
support.patch(self, os, "popen", self.mock_popen)
|
||||
self.browser = webbrowser.MacOSXOSAScript("default")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue