MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_remote_exec_disabled_by_env

Method test_remote_exec_disabled_by_env

Lib/test/test_sys.py:2150–2155  ·  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

2148 self.assertIn(b"Remote script executed successfully", stdout)
2149
2150 def test_remote_exec_disabled_by_env(self):
2151 """Test remote exec is disabled when PYTHON_DISABLE_REMOTE_DEBUG is set"""
2152 env = os.environ.copy()
2153 env['PYTHON_DISABLE_REMOTE_DEBUG'] = '1'
2154 with self.assertRaisesRegex(RuntimeError, "Remote debugging is not enabled in the remote process"):
2155 self._run_remote_exec_test("print('should not run')", env=env)
2156
2157 def test_remote_exec_disabled_by_xoption(self):
2158 """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