Test that EOF signal properly exits the debugger.
(self)
| 1272 | self.assertEqual(process.returncode, 0) |
| 1273 | |
| 1274 | def test_handle_eof(self): |
| 1275 | """Test that EOF signal properly exits the debugger.""" |
| 1276 | self._create_script() |
| 1277 | process, client_file = self._connect_and_get_client_file() |
| 1278 | |
| 1279 | with kill_on_error(process): |
| 1280 | # Skip initial messages until we get to the prompt |
| 1281 | self._read_until_prompt(client_file) |
| 1282 | |
| 1283 | # Send EOF signal to exit the debugger |
| 1284 | client_file.write(json.dumps({"signal": "EOF"}).encode() + b"\n") |
| 1285 | client_file.flush() |
| 1286 | |
| 1287 | # The process should complete normally after receiving EOF |
| 1288 | stdout, stderr = process.communicate(timeout=SHORT_TIMEOUT) |
| 1289 | |
| 1290 | # Verify process completed correctly |
| 1291 | self.assertIn("Function returned: 42", stdout) |
| 1292 | self.assertEqual(process.returncode, 0) |
| 1293 | self.assertEqual(stderr, "") |
| 1294 | |
| 1295 | def test_protocol_version(self): |
| 1296 | """Test that incompatible protocol versions are properly detected.""" |
nothing calls this directly
no test coverage detected