classification
Title: Random failure in test_idle
Type: behavior Stage: resolved
Components: IDLE, Tests Versions: Python 3.8
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: cheryl.sabella, serhiy.storchaka, terry.reedy
Priority: normal Keywords:

Created on 2019-03-14 06:34 by serhiy.storchaka, last changed 2019-03-23 08:28 by serhiy.storchaka. This issue is now closed.

Files
File name Uploaded Description Edit
test_cdfail.py terry.reedy, 2019-03-15 05:11
Messages (6)
msg337897 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-03-14 06:34
I have got a failure in test_idle:

0:00:21 load avg: 3.40 [ 76/420/1] test_idle failed
test test_idle failed -- Traceback (most recent call last):
  File "/home/serhiy/py/cpython-clinic/Lib/idlelib/idle_test/test_configdialog.py", line 104, in test_fontlist_key
    self.assertNotEqual(down_font, font)
AssertionError: 'Abyssinica SIL' == 'Abyssinica SIL'

It has not reproduced when run test_idle separately.
msg337964 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-03-15 05:11
I am guessing that test_idle and hence this test have been run over 500 days X 20 runs/day (10000 times) since merged.  This is the first report I have seen, though failures that get retested would be masked.  My guess is a sporadic timing delay such that the assertion is tested before the widget is updated.  Serhiy, does this make sense?

I have reproduced the failure 8 times by running the attached file, derived from test_configdialog, in IDLE.  Reps required ranged from about 1000 to 30000, plus I stopped once at nearly 100000 with no failure.  About half appeared to be a direct result.  All appeared to be an up/down font test, the first of the pair.

Tomorrow, I intend to run this more, including from command line, and then insert update() or update_idletasks() to see if either dependably suppress failure.  I am curious what happens on Linux.
msg338633 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-03-23 00:24
#36389 appears to be a similar failure.
msg338641 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-03-23 04:11
I reran test_cdfail and it did 2.7 million loops without failure.
msg338650 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-03-23 07:18
I can not reproduce the failure by running the script. But I get it when switch to other window or change the focus in other way. My guess is that I clicked on other window when ran tests.
msg338658 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-03-23 08:06
I found that clicking on the font sample was usually enough to cause a failure and restart.  Should we close this?
History
Date User Action Args
2019-03-23 08:28:41serhiy.storchakasetstatus: open -> closed
resolution: not a bug
stage: resolved
2019-03-23 08:06:41terry.reedysetmessages: + msg338658
2019-03-23 07:18:08serhiy.storchakasetmessages: + msg338650
2019-03-23 04:11:30terry.reedysetmessages: + msg338641
2019-03-23 00:24:40terry.reedysetmessages: + msg338633
2019-03-15 05:11:50terry.reedysetfiles: + test_cdfail.py
nosy: + cheryl.sabella
messages: + msg337964

2019-03-14 06:34:05serhiy.storchakacreate