Bell-using files patched (module and test)
autoexpand, parenmatch, replace, search, undo
Bell-using files not patched (no test yet)
debugger, editor, grep, history, pyshell, scrolled_list, zoomheight
A second bonus is that the dummy bell function, instead of lambda: None, can be a mock used to test that bell() was called when it should be (or even not). This was already true for test_undo, except that the mock wrapped rather than replaced the real bell function. I opened spinoff #27733 to extend this idea.
To make this possible, I gave the class instances a self.bell function that was replaced by the test code afterwards. I am leaving this issue open to give the other bell-using classes a similar attribute in preparation for future tests. |