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

Method setUp

Lib/idlelib/idle_test/test_sidebar.py:439–449  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

437 cls.root.update()
438
439 def setUp(self):
440 # In some test environments, e.g. Azure Pipelines (as of
441 # Apr. 2021), sys.stdout is changed between tests. However,
442 # PyShell relies on overriding sys.stdout when run without a
443 # sub-process (as done here; see setUpClass).
444 self._saved_stdout = None
445 if sys.stdout != self.shell.stdout:
446 self._saved_stdout = sys.stdout
447 sys.stdout = self.shell.stdout
448
449 self.reset_shell()
450
451 def tearDown(self):
452 if self._saved_stdout is not None:

Callers

nothing calls this directly

Calls 1

reset_shellMethod · 0.95

Tested by

no test coverage detected