Title: idle_test: failures on x86 Windows7 3.x
Type: behavior Stage: resolved
Components: IDLE, Tests Versions: Python 3.7, Python 3.6
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: serhiy.storchaka, terry.reedy, vstinner
Priority: normal Keywords: patch

Created on 2017-11-07 15:23 by vstinner, last changed 2018-05-29 21:55 by vstinner. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 4330 closed terry.reedy, 2017-11-08 04:27
Messages (7)
msg305763 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-11-07 15:23

ERROR: tearDownClass (idlelib.idle_test.test_configdialog.KeysPageTest)
Traceback (most recent call last):
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\idlelib\idle_test\", line 701, in tearDownClass
    del page.set_keys_type, page.load_keys_list
AttributeError: set_keys_type
FAIL: test_set_keys_type (idlelib.idle_test.test_configdialog.KeysPageTest)
Traceback (most recent call last):
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\idlelib\idle_test\", line 859, in test_set_keys_type
    eq(d.custom_keyset_on.state(), ('selected',))
AssertionError: Tuples differ: ('selected', 'hover') != ('selected',)
First tuple contains 1 additional elements.
First extra element 1:
- ('selected', 'hover')
?             --------
+ ('selected',)
msg305805 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-11-08 04:39
The failure in tearDownClass is a side-effect of the failure in test_set_keys causing 'p.set_keys_type = Func' being skipped.  That could be prevented with 'try:<anything that could fail>finally: p.set_keys_type = Func'.

I am completely puzzled at the sudden failure on one machine.  configdialog and test_configdialog were lasted changed 11 days ago (10/27) by Serhey's patch to make font samples editable.  test_idle passed consistently everywhere, including that machine, until build 121, 16 hours ago, and then suddenly started failing, consistently, on that one machine (as far as I know).  It continues to pass on my Win 10 machine, freshly updated with Python rebuilt.  I also checked the git log for tkinter.__init__ and tkinter.ttk and they have not been changed either.

The failure message is also a surprise.  'custom_keyset_on' is a ttk Radiobutton.
does not list 'hover' as a state.  However
does (so the doc needs fixing): "The mouse cursor is within the widget."

Perhaps 'hover' is a result of previous mouse cursor positioning from event_generates in the font tab test.  (Why the sudden change on one system would still be a puzzle.)  If this is the reason, then I only need to worry about this one state test.

Otherwise, I would have to think about either parking the cursor where it cannot interfere, or about minimizing the dialog when it does not need to be de-iconified for event_generate to work.

Serhiy, any thoughts on this?
msg305806 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-11-08 04:53
In build 129, which finished perhaps 3 hours ago, test_idle passed again.  I think we should merge the fix anyway in case 'hover' appears again on some machine.

A similar try:except is needed elsewhere.
msg305814 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-11-08 09:53
> I am completely puzzled at the sudden failure on one machine.

The "x86 Windows7 3.x" buildbot worker is very slow. So this bug is probably a race condition which is hard to trigger on a fast machine.
msg308401 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-12-15 15:12
Terry: you proposed a fix, do you still want to write it? The buildbot didn't fail again since I reported the failure.
msg308422 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-12-15 19:33
I want to add the try-except here and in the few other places where a method is temporarily masked.  One failure causing another strikes me a  test code bug.  I would like to hold off on adding 'hover', as it now seems to have been an idiosyncratic and temporary glitch on one buildbot.  I cannot see anything different about this particular button state check.  If 'hover' were needed here, so it would seem equally needed in several other places.
msg318109 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-05-29 21:55
I didn't see the failure recently, I close the issue.
Date User Action Args
2018-05-29 21:55:49vstinnersetstatus: open -> closed
resolution: out of date
messages: + msg318109

stage: patch review -> resolved
2017-12-15 19:33:53terry.reedysetmessages: + msg308422
2017-12-15 15:12:36vstinnersetmessages: + msg308401
2017-11-08 09:53:42vstinnersetmessages: + msg305814
2017-11-08 04:53:49terry.reedysetmessages: + msg305806
2017-11-08 04:39:26terry.reedysetassignee: terry.reedy
type: behavior
components: + IDLE
versions: + Python 3.6
nosy: + serhiy.storchaka

messages: + msg305805
2017-11-08 04:27:34terry.reedysetkeywords: + patch
stage: patch review
pull_requests: + pull_request4286
2017-11-07 15:23:17vstinnercreate