This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cheryl.sabella
Recipients cheryl.sabella, louielu, terry.reedy
Date 2017-09-14.23:42:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1505432561.38.0.901841361228.issue30780@psf.upfronthosting.co.za>
In-reply-to
Content
I've submitted a PR for the tests that I added to complete coverage for Keys and Highlights and to add some GUI tests for the buttons.  It's not everything that I wanted to do, but it ended up being more substantial than I realized.

Here's the issue I was having with testing `Double-Button-1` and `B1-Motion`.  After the first ButtonPress and ButtonRelease, the second (or later) event-generate always looked like it was a double click (it probably was really a triple click or higher, depending how many times I tried it).  I tried everything I could think of or find online, but I couldn't find how to reset the counts to start over and make it think it was a just `ButtonPress` and not a `Double-Button`.  

This was OK for the testing on `Double-Button`, but it was causing the `B1-Motion` not to work because it was not seeing each 'movement' as a press/move/release, but rather a double-button/move/release.  It was OK because the Double also invokes the Press callback, however, since the Double event was bound to `break`, it didn't allow the text to be selected. (The difference between `Double` and `B1-Motion` is that Double selects a word and B1-Motion selects where the mouse moves).

I played with it in IDLE and I could reset the Press by doing an event-generate on a different (x, y), but that didn't work in the test.  I tried a delay and it still didn't fix it.

Anyway, I've learned a lot about mouse binding while working on this, but without a solution, I cheated and just did ButtonPress on a different (x, y) for the second test.

Sorry about the rambling, but I'd love to know the trick to resetting the number of button presses in a test.
History
Date User Action Args
2017-09-14 23:42:41cheryl.sabellasetrecipients: + cheryl.sabella, terry.reedy, louielu
2017-09-14 23:42:41cheryl.sabellasetmessageid: <1505432561.38.0.901841361228.issue30780@psf.upfronthosting.co.za>
2017-09-14 23:42:41cheryl.sabellalinkissue30780 messages
2017-09-14 23:42:41cheryl.sabellacreate