gh-75710: IDLE: Add tests to some editor.py functions#3669
Conversation
|
I was trying to understand the editor functions accessed from configdialog so that I could test those and thought the best way to understand what was really happening was to document and test the functions being called. Some notes:
Sorry that this is still massive. I really tried to limit it to what I needed to look at. |
Sorry, something went wrong.
taleinat
left a comment
There was a problem hiding this comment.
Amazing work adding so many tests for the editor window! I think these are sorely needed, and it's too bad they've been languishing here for a while now.
I've got a bunch of review comments, but overall this is a huge improvement, and I'd like to help get it through!
Sorry, something went wrong.
terryjreedy
left a comment
There was a problem hiding this comment.
I am going to first edit the new docstrings as indicated in my reponses to Tal's comments, and make a separate PR.
Sorry, something went wrong.
|
When you're done making the requested changes, leave the comment: |
Sorry, something went wrong.
|
Whoops, by responding to Tal's comments as part of a new review, my responses got listed twice, once under Tal's comment where they below and then again separately, without the context. |
Sorry, something went wrong.
|
I minimally resolved the merge conflict in the web box so I could proceed. This did a full merge update rather than just updating the one file. There is still the redundancy of global requires gui and class requires gui to be fixed, and Tal's other conflicts. Since I had to do this, I will go ahead and edit everything on this PR. |
Sorry, something went wrong.
|
I stopped the Windows test failures by commenting out the failing lines with an explanation. The Ubuntu failure is May do the same here. |
Sorry, something went wrong.
|
I think editor.py is more or less commit ready. Tal, review again or not as you wish. Test_editor is not ready. test_editor passes, but still needs requires('gui') restricted. I want to try Tal's suggested alternative. And also make sure that every test is actually testing. The test I revised was not, as the function supposedly being tested was mocked. test_mainmenu passes by itself, but test_idle fails with File "f:\dev\3x\lib\idlelib\idle_test\test_mainmenu.py", line 17, in test_default_keydefs 5 happens to be the length of keydefs used in test_editor, which run first, so the test change is somehow affecting mainmenu. This is probably via changing something in config. test_editor does not import config, but editor does. |
Sorry, something went wrong.
|
Additional test failure: Windows error box titled "Document Start Failure" with message "(X) boom". Test freezes until box is dismissed. I suspect a test of additional help resources needs mocks for both Windows and *nix. |
Sorry, something went wrong.
Commit extracted from PR python#3669. Will edits more later. Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
…ythonGH-104446) Commit extracted from PR pythonGH-3669. Will edit more later. (cherry picked from commit 46f1c78) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
Add docstrings and test for editor.py functions related to the reload from configdialog, creating the menubar, and applying keybindings.
https://bugs.python.org/issue31529