Test remote exec with an exception raised in the target process The exception should be raised in the main thread of the target process but not crash the target process.
(self)
| 2149 | self.assertEqual(stderr, b"") |
| 2150 | |
| 2151 | def test_remote_exec_with_exception(self): |
| 2152 | """Test remote exec with an exception raised in the target process |
| 2153 | |
| 2154 | The exception should be raised in the main thread of the target process |
| 2155 | but not crash the target process. |
| 2156 | """ |
| 2157 | script = ''' |
| 2158 | raise Exception("Remote script exception") |
| 2159 | ''' |
| 2160 | returncode, stdout, stderr = self._run_remote_exec_test(script) |
| 2161 | self.assertEqual(returncode, 0) |
| 2162 | self.assertIn(b"Remote script exception", stderr) |
| 2163 | self.assertEqual(stdout.strip(), b"Target process running...") |
| 2164 | |
| 2165 | def test_new_namespace_for_each_remote_exec(self): |
| 2166 | """Test that each remote_exec call gets its own namespace.""" |
nothing calls this directly
no test coverage detected