Repository navigation
IDLE: test_configdialog failed #75677
Description
Activity
$ ./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 iterabletest_idle failed
1 test failed:
test_idleTotal duration: 2 sec
Tests result: FAILUREMaybe this is related to HiDPI display.
On 2.7 the test is passed.
- addedtestsTests in the Lib/test dirTests in the Lib/test dir
on Sep 17, 2017 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}')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.
On windows, hs.see(start), followed or not by update_idletasks(), has no effect.
Does the fix for bpo-31500 fix this also?
No, the fix for bpo-31500 doesn't affect this issue.
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.Updated patch for bpo-31500 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.
Closing as duplicate of #75681 (former 31500)
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields: