Test that each remote_exec call gets its own namespace.
(self)
| 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.""" |
| 2167 | script = textwrap.dedent( |
| 2168 | """ |
| 2169 | assert globals() is not __import__("__main__").__dict__ |
| 2170 | print("Remote script executed successfully!") |
| 2171 | """ |
| 2172 | ) |
| 2173 | returncode, stdout, stderr = self._run_remote_exec_test(script) |
| 2174 | self.assertEqual(returncode, 0) |
| 2175 | self.assertEqual(stderr, b"") |
| 2176 | self.assertIn(b"Remote script executed successfully", stdout) |
| 2177 | |
| 2178 | def test_remote_exec_disabled_by_env(self): |
| 2179 | """Test remote exec is disabled when PYTHON_DISABLE_REMOTE_DEBUG is set""" |
nothing calls this directly
no test coverage detected