@@ -264,7 +264,7 @@ def _create_script(self, script=None):
264
264
def foo():
265
265
x = 42
266
266
return bar()
267
-
267
+
268
268
def bar():
269
269
return 42
270
270
@@ -311,13 +311,13 @@ def _connect_and_get_client_file(self):
311
311
stderr = subprocess .PIPE ,
312
312
text = True
313
313
)
314
-
314
+
315
315
# Accept the connection from the subprocess
316
316
client_sock , _ = self .server_sock .accept ()
317
317
client_file = client_sock .makefile ('rwb' )
318
318
self .addCleanup (client_file .close )
319
319
self .addCleanup (client_sock .close )
320
-
320
+
321
321
return process , client_file
322
322
323
323
def _read_until_prompt (self , client_file ):
@@ -337,7 +337,7 @@ def _send_command(self, client_file, command):
337
337
"""Helper to send a command to the debugger."""
338
338
client_file .write (json .dumps ({"reply" : command }).encode () + b"\n " )
339
339
client_file .flush ()
340
-
340
+
341
341
def _send_interrupt (self , pid ):
342
342
"""Helper to send an interrupt signal to the debugger."""
343
343
# with tempfile.NamedTemporaryFile("w", delete_on_close=False) as interrupt_script:
@@ -380,9 +380,9 @@ def test_connect_and_basic_commands(self):
380
380
381
381
# Check for response - we should get some stack frames
382
382
messages = self ._read_until_prompt (client_file )
383
-
383
+
384
384
# Extract text messages containing stack info
385
- text_msg = [msg ['message' ] for msg in messages
385
+ text_msg = [msg ['message' ] for msg in messages
386
386
if 'message' in msg and 'connect_to_debugger' in msg ['message' ]]
387
387
got_stack_info = bool (text_msg )
388
388
@@ -423,7 +423,7 @@ def test_breakpoints(self):
423
423
# Continue execution until breakpoint
424
424
self ._send_command (client_file , "c" )
425
425
messages = self ._read_until_prompt (client_file )
426
-
426
+
427
427
# Verify we hit the breakpoint
428
428
hit_msg = next (msg ['message' ] for msg in messages if 'message' in msg )
429
429
self .assertIn ("bar()" , hit_msg )
@@ -464,7 +464,7 @@ def bar():
464
464
version=pdb._PdbServer.protocol_version(),
465
465
)
466
466
print("Connected to debugger")
467
- iterations = 10
467
+ iterations = 100
468
468
while iterations > 0:
469
469
print("Iteration", iterations)
470
470
time.sleep(1)
0 commit comments