with self.assertRaises(OSError):
sys.remote_exec(99999, "print('should not run')")
+ def test_remote_exec_invalid_script(self):
+ """Test remote exec with invalid script type"""
+ with self.assertRaises(TypeError):
+ sys.remote_exec(0, None)
+ with self.assertRaises(TypeError):
+ sys.remote_exec(0, 123)
+
def test_remote_exec_syntax_error(self):
"""Test remote exec with syntax error in script"""
script = '''
PyObject *path;
const char *debugger_script_path;
- if (PyUnicode_FSConverter(script, &path) < 0) {
+ if (PyUnicode_FSConverter(script, &path) == 0) {
return NULL;
}
debugger_script_path = PyBytes_AS_STRING(path);