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

Method test_remote_exec_syntax_error

Lib/test/test_sys.py:2174–2182  ·  view source on GitHub ↗

Test remote exec with syntax error in script

(self)

Source from the content-addressed store, hash-verified

2172 sys.remote_exec(0, 123)
2173
2174 def test_remote_exec_syntax_error(self):
2175 """Test remote exec with syntax error in script"""
2176 script = '''
2177this is invalid python code
2178'''
2179 returncode, stdout, stderr = self._run_remote_exec_test(script)
2180 self.assertEqual(returncode, 0)
2181 self.assertIn(b"SyntaxError", stderr)
2182 self.assertEqual(stdout.strip(), b"Target process running...")
2183
2184 def test_remote_exec_invalid_script_path(self):
2185 """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