Tal Einat added the comment:

Here's a completely re-written patch!

The patch is against current 3.3 (changeset 360976a6d8b9), since that's what 
Terry requested recently on issue3068. It also applies cleanly to the current 
default branch (changeset 360976a6d8b9).

This patch has cleaner, modern code, with doc-strings everywhere and 
informative comments where appropriate. It also uses "import tkinter as tk" as 
Terry recently requested on issue3068.

Furthermore, I've added a very complete set of tests for the new extension, 
which tests everything I could think of and achieves 100% coverage (!) of 
Squeezer.py. These are modern tests which make extensive use of mocking via the 
awesome unittest.mock module. I've included extensive in-code comments with the 
tests. Hopefully these will be useful as a reference for writing additional 
tests for IDLE code (at least other extensions).

Finally, this patch includes a minor change to ToolTip.py, adding the ability 
to specify the delay after which a tooltip is displayed (was hard-coded to 1.5 
seconds). This change is required by the extension (I prefer that it uses 
tooltips with no delay).

----------
Added file: 
http://bugs.python.org/file34050/taleinat.20140211.IDLE_Squeezer.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1529353>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to