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

Method test_remote_exec_disabled_by_env

Lib/test/test_sys.py:2178–2183  ·  view source on GitHub ↗

Test remote exec is disabled when PYTHON_DISABLE_REMOTE_DEBUG is set

(self)

Source from the content-addressed store, hash-verified

2176 self.assertIn(b"Remote script executed successfully", stdout)
2177
2178 def test_remote_exec_disabled_by_env(self):
2179 """Test remote exec is disabled when PYTHON_DISABLE_REMOTE_DEBUG is set"""
2180 env = os.environ.copy()
2181 env['PYTHON_DISABLE_REMOTE_DEBUG'] = '1'
2182 with self.assertRaisesRegex(RuntimeError, "Remote debugging is not enabled in the remote process"):
2183 self._run_remote_exec_test("print('should not run')", env=env)
2184
2185 def test_remote_exec_disabled_by_xoption(self):
2186 """Test remote exec is disabled with -Xdisable-remote-debug"""

Callers

nothing calls this directly

Calls 3

_run_remote_exec_testMethod · 0.95
assertRaisesRegexMethod · 0.80
copyMethod · 0.45

Tested by

no test coverage detected