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

Method test_remote_exec_syntax_error

Lib/test/test_sys.py:2202–2210  ·  view source on GitHub ↗

Test remote exec with syntax error in script

(self)

Source from the content-addressed store, hash-verified

2200 sys.remote_exec(0, 123)
2201
2202 def test_remote_exec_syntax_error(self):
2203 """Test remote exec with syntax error in script"""
2204 script = '''
2205this is invalid python code
2206'''
2207 returncode, stdout, stderr = self._run_remote_exec_test(script)
2208 self.assertEqual(returncode, 0)
2209 self.assertIn(b"SyntaxError", stderr)
2210 self.assertEqual(stdout.strip(), b"Target process running...")
2211
2212 def test_remote_exec_invalid_script_path(self):
2213 """Test remote exec with invalid script path"""

Callers

nothing calls this directly

Calls 4

_run_remote_exec_testMethod · 0.95
assertInMethod · 0.80
assertEqualMethod · 0.45
stripMethod · 0.45

Tested by

no test coverage detected