MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / test_case_6

Function test_case_6

tests_python/test_debugger.py:417–451  ·  view source on GitHub ↗
(case_setup)

Source from the content-addressed store, hash-verified

415
416
417def test_case_6(case_setup):
418 with case_setup.test_file("_debugger_case56.py") as writer:
419 writer.write_add_breakpoint(2, "Call2")
420 writer.write_make_initial_run()
421
422 hit = writer.wait_for_breakpoint_hit()
423 thread_id = hit.thread_id
424 frame_id = hit.frame_id
425
426 writer.write_get_frame(thread_id, frame_id)
427
428 writer.write_step_return(thread_id)
429
430 hit = writer.wait_for_breakpoint_hit("109")
431 thread_id = hit.thread_id
432 frame_id = hit.frame_id
433 line = hit.line
434
435 assert line == 8, "Expecting it to go to line 8. Went to: %s" % line
436
437 writer.write_step_in(thread_id)
438
439 hit = writer.wait_for_breakpoint_hit("107")
440 thread_id = hit.thread_id
441 frame_id = hit.frame_id
442 line = hit.line
443
444 # goes to line 4 in jython (function declaration line)
445 assert line in (4, 5), "Expecting it to go to line 4 or 5. Went to: %s" % line
446
447 writer.write_run_thread(thread_id)
448
449 assert 13 == writer._sequence, "Expected 15. Had: %s" % writer._sequence
450
451 writer.finished_ok = True
452
453
454@pytest.mark.skipif(IS_IRONPYTHON, reason="This test is flaky on Jython, so, skipping it.")

Callers

nothing calls this directly

Calls 8

test_fileMethod · 0.80
write_add_breakpointMethod · 0.80
write_get_frameMethod · 0.80
write_step_returnMethod · 0.80
write_run_threadMethod · 0.80
write_step_inMethod · 0.45

Tested by

no test coverage detected