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.

classification
Title: IDLE: test_configdialog failed
Type: Stage:
Components: IDLE, Tests Versions: Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: serhiy.storchaka, terry.reedy
Priority: normal Keywords:

Created on 2017-09-17 15:35 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin.

Files
File name Uploaded Description Edit
failure.txt serhiy.storchaka, 2017-09-17 19:12
success.txt serhiy.storchaka, 2017-09-17 19:12
Messages (7)
msg302369 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-09-17 15:35
$ ./python -m test -uall test_idle 
Run tests sequentially
0:00:00 load avg: 1.19 [1/1] test_idle
invalid command name "140662890299080timer_event"
    while executing
"140662890299080timer_event"
    ("after" script)
test test_idle failed -- Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/idlelib/idle_test/test_configdialog.py", line 417, in test_highlight_target_text_mouse
    click_it(start_index)
  File "/home/serhiy/py/cpython/Lib/idlelib/idle_test/test_configdialog.py", line 401, in click_it
    x, y, dx, dy = hs.bbox(start)
TypeError: 'NoneType' object is not iterable

test_idle failed

1 test failed:
    test_idle

Total duration: 2 sec
Tests result: FAILURE


Maybe this is related to HiDPI display.

On 2.7 the test is passed.
msg302378 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-09-17 17:47
Are you running on Linux or Mac?  What tk version?

About the 'invalid command name' message: PR3622, patching idlelib.codecontext, merged to master 13 hours ago, fixed this for me on Windows.  (It added CodeContext.__del__.)  Did it fail on your machine or was it not yet merged on your machine?

About the test failure.  Hs is a Text with about 14 lines.  The test initially executes
        hs.see(1.0)
        hs.update_idletasks()
hs.bbox(start) means that the tag start is not visible,  which should realistically not be possible.  But a quick web search suggests there have been problems with HiDPI and tk, and hence tkinter.

I am curious what value of start fails.  Could you run once with 'print(start)' added above bbox(start)?

Does inserting the following just before hs.bbox(start) fix the issue?
        hs.see(start)
        hs.update_idletasks()
If not, we can skip.  Does the following print one or multiple skip messages?
        try:
            x, y, dx, dy = hs.bbox(start)
        except TypeError:
            self.skipTest(f'bbox failure with start {start}')
msg302382 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-09-17 19:12
About the 'invalid command name' message: PR 3622 was not yet merged on your machine.

Inserting hs.see(start) just before hs.bbox(start) fixes the issue.

I have added some debug prints. Here are outputs, with and without a fix.
msg302433 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-09-18 09:20
On windows, hs.see(start), followed or not by update_idletasks(), has no effect.

Does the fix for #31500 fix this also?
msg302440 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-09-18 09:44
No, the fix for issue31500 doesn't affect this issue.
msg302478 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-09-18 18:33
If the test only fails with a HiDPI screen, then it must somehow be related.  But if the highlight sample is normal size, like the font sample in
https://bugs.python.org/file47141/Screenshot_20170917_213616.png
then the relationship must not be as simple as I was thinking.
msg302511 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-09-19 10:03
Updated patch for issue31500 fixes this issue. I guess the problem was with using fixed size for the dialog widget. It was too small and the part of the example was not visible.
History
Date User Action Args
2022-04-11 14:58:52adminsetgithub: 75677
2017-09-19 10:03:13serhiy.storchakasetmessages: + msg302511
2017-09-18 18:33:04terry.reedysetmessages: + msg302478
2017-09-18 09:44:45serhiy.storchakasetmessages: + msg302440
2017-09-18 09:20:52terry.reedysetmessages: + msg302433
2017-09-17 19:12:30serhiy.storchakasetfiles: + success.txt
2017-09-17 19:12:12serhiy.storchakasetfiles: + failure.txt

messages: + msg302382
2017-09-17 17:47:27terry.reedysetmessages: + msg302378
2017-09-17 15:35:04serhiy.storchakacreate