-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-79871: IDLE - Fix and test debugger module #11451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… using the modern super function
…andling of frames in user_line
Also requesting review from @csabella |
I'm going to continue merging tests into this PR instead of opening separate ones |
…the '.reset()' method. This method is never called, so the attribute does not exist and under certain situations, could crash the debugger window
just realised I've been writing these all as pytest assertions. Will amend existing commits |
@terryjreedy I'm still adding tests so this isn't ready for review yet. But early feedback would be welcome as this is my first foray into the idle_test suite |
Yes, additional debugger tests should go here. |
@terryjreedy I've finished the test suite. There is quite a heavy use of mock, but mostly to isolate the behaviours and validate that the methods call the underlying components with the correct values. I've also created a class in here as a reflection of Something I saw a lot but wasn't sure why it existed, where these empty single-line comments. https://github.com/python/cpython/pull/11451/files#diff-6428b52d9491cd87d1aaac56558bdd7bL235 do you know what they're for? I assumed to break up the large functions, but empty lines are normally used for that. I've never come across it before and wondered if there was a reason. |
|
|
|
|
|
|
|
|
|
|
|
Add docstrings to the debugger module. Fix two bugs: initialize Idb.botframe (should be in Bdb); In Idb.in_rpc_code, check whether prev_frame is None before trying to use it. Make other code changes. Expand test_debugger coverage from 19% to 66%. --------- Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Add docstrings to the debugger module. Fix two bugs: initialize Idb.botframe (should be in Bdb); In Idb.in_rpc_code, check whether prev_frame is None before trying to use it. Make other code changes. Expand test_debugger coverage from 19% to 66%. --------- Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Add docstrings to the debugger module. Fix two bugs: initialize Idb.botframe (should be in Bdb); In Idb.in_rpc_code, check whether prev_frame is None before trying to use it. Make other code changes.
Expand test_debugger from nearly nothing.