mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-134064: Fix sys.remote_exec() error checking (#134067)
This commit is contained in:
parent
fc7f4c3666
commit
009e7b3698
2 changed files with 8 additions and 1 deletions
|
@ -2176,6 +2176,13 @@ raise Exception("Remote script exception")
|
|||
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 = '''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue