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

Method setUp

Lib/test/test_pyrepl/test_pyrepl.py:1882–1889  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1880@skipIf((os.environ.get("TERM") or "dumb") == "dumb", "can't use pyrepl in dumb terminal")
1881class TestMain(ReplTestCase):
1882 def setUp(self):
1883 # Cleanup from PYTHON* variables to isolate from local
1884 # user settings, see #121359. Such variables should be
1885 # added later in test methods to patched os.environ.
1886 super().setUp()
1887 patcher = patch('os.environ', new=make_clean_env())
1888 self.addCleanup(patcher.stop)
1889 patcher.start()
1890
1891 @force_not_colorized
1892 def test_exposed_globals_in_repl(self):

Callers

nothing calls this directly

Calls 5

patchFunction · 0.90
make_clean_envFunction · 0.90
superClass · 0.85
addCleanupMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected