Skip to content

Commit 7a2bf51

Browse files
committed
More tests
1 parent 205bc55 commit 7a2bf51

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Lib/test/test_remote_pdb.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def _create_script(self, script=None):
264264
def foo():
265265
x = 42
266266
return bar()
267-
267+
268268
def bar():
269269
return 42
270270
@@ -311,13 +311,13 @@ def _connect_and_get_client_file(self):
311311
stderr=subprocess.PIPE,
312312
text=True
313313
)
314-
314+
315315
# Accept the connection from the subprocess
316316
client_sock, _ = self.server_sock.accept()
317317
client_file = client_sock.makefile('rwb')
318318
self.addCleanup(client_file.close)
319319
self.addCleanup(client_sock.close)
320-
320+
321321
return process, client_file
322322

323323
def _read_until_prompt(self, client_file):
@@ -337,7 +337,7 @@ def _send_command(self, client_file, command):
337337
"""Helper to send a command to the debugger."""
338338
client_file.write(json.dumps({"reply": command}).encode() + b"\n")
339339
client_file.flush()
340-
340+
341341
def _send_interrupt(self, pid):
342342
"""Helper to send an interrupt signal to the debugger."""
343343
# with tempfile.NamedTemporaryFile("w", delete_on_close=False) as interrupt_script:
@@ -380,9 +380,9 @@ def test_connect_and_basic_commands(self):
380380

381381
# Check for response - we should get some stack frames
382382
messages = self._read_until_prompt(client_file)
383-
383+
384384
# Extract text messages containing stack info
385-
text_msg = [msg['message'] for msg in messages
385+
text_msg = [msg['message'] for msg in messages
386386
if 'message' in msg and 'connect_to_debugger' in msg['message']]
387387
got_stack_info = bool(text_msg)
388388

@@ -423,7 +423,7 @@ def test_breakpoints(self):
423423
# Continue execution until breakpoint
424424
self._send_command(client_file, "c")
425425
messages = self._read_until_prompt(client_file)
426-
426+
427427
# Verify we hit the breakpoint
428428
hit_msg = next(msg['message'] for msg in messages if 'message' in msg)
429429
self.assertIn("bar()", hit_msg)
@@ -464,7 +464,7 @@ def bar():
464464
version=pdb._PdbServer.protocol_version(),
465465
)
466466
print("Connected to debugger")
467-
iterations = 10
467+
iterations = 100
468468
while iterations > 0:
469469
print("Iteration", iterations)
470470
time.sleep(1)

0 commit comments

Comments
 (0)