MCPcopy Index your code
hub / github.com/python/cpython / setUp

Method setUp

Lib/test/test_webbrowser.py:332–339  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

330@requires_subprocess()
331class MacOSXOSAScriptTest(unittest.TestCase):
332 def setUp(self):
333 # Ensure that 'BROWSER' is not set to 'open' or something else.
334 # See: https://github.com/python/cpython/issues/131254.
335 env = self.enterContext(os_helper.EnvironmentVarGuard())
336 env.unset("BROWSER")
337
338 support.patch(self, os, "popen", self.mock_popen)
339 self.browser = webbrowser.MacOSXOSAScript("default")
340
341 def mock_popen(self, cmd, mode):
342 self.popen_pipe = MockPopenPipe(cmd, mode)

Callers

nothing calls this directly

Calls 2

enterContextMethod · 0.80
unsetMethod · 0.80

Tested by

no test coverage detected