Message209876
| Author |
ned.deily |
| Recipients |
ned.deily, serhiy.storchaka |
| Date |
2014年02月01日.07:02:10 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1391238131.07.0.720424481499.issue19761@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
There are three different classes of errors here:
1. test_debug AssertionError: '0' != 0
This has already been fixed by 7dab4feec126/05e84d3ecd1e/e7d922d8ee03 for Issue6517.
2. test_bitmap checks for invalid bitmap values do not fail as expected with Cocoa Tk
This appears to be a bug in Cocoa Tk, reproducible with the wish shell. I've opened a Tk issue for it:
https://core.tcl.tk/tk/tktview?name=31cd33dbf0
The simplest approach would be to just skip test_bitmap for OS X until this is fixed. A more focused workaround patch would be to only skip the checkInvalidParam test when running under Cocoa Tk:
'aqua' in root.tk.call('tk', 'windowingsystem') and
'AppKit' in root.tk.call('winfo', 'server', '.')
3. test_insertborderwidth failures for Entry and Spinbox widgets
After a little investigation, I think this is a test case error. at least for Entry. According to third-party Tkinter documentation (http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/entry.html) for the Entry widget:
"By default, the insertion cursor is a simple rectangle. You can get the cursor with the tk.RAISED relief effect (see Section 5.6, 'Relief styles') by setting insertborderwidth to the dimension of the 3-d border. If you do, make sure that the insertwidth option is at least twice that value."
It looks like for both the OS X Carbon (8.4) and Cocoa (8.5 and 8.6) Tks, the restriction about insertwidth is enforced, but with the X11 Tk, it is not.
Some examples using Cocoa Tk (8.5.15) and 3.4.0b3:
>>> from tkinter import *; r = Tk()
>>> w = Entry(r, insertborderwidth=1.3); w.pack(); w['insertborderwidth']
0
>>> w = Entry(r, insertborderwidth=1.3, insertwidth=10); w.pack(); w['insertborderwidth']
1
>>> w = Entry(r, insertborderwidth=2); w.pack(); w['insertborderwidth']
0
>>> w = Entry(r, insertborderwidth=2, insertwidth=10); w.pack(); w['insertborderwidth']
2
>>> w = Entry(r, insertborderwidth='10p'); w.pack(); w['insertborderwidth']
0
>>> w = Entry(r, insertborderwidth='10p', insertwidth=10); w.pack(); w['insertborderwidth']
5
Using X11 Tk (8.6.1) on OS X:
>>> from tkinter import *; r = Tk()
>>> w = Entry(r, insertborderwidth=1.3); w.pack(); w['insertborderwidth']
1
>>> w = Entry(r, insertborderwidth=1.3, insertwidth=10); w.pack(); w['insertborderwidth']
1
>>> w = Entry(r, insertborderwidth=2); w.pack(); w['insertborderwidth']
1
>>> w = Entry(r, insertborderwidth=2, insertwidth=10); w.pack(); w['insertborderwidth']
2
>>> w = Entry(r, insertborderwidth='10p'); w.pack(); w['insertborderwidth']
1
>>> w = Entry(r, insertborderwidth='10p', insertwidth=10); w.pack(); w['insertborderwidth']
5
So it appears the tests could be made to pass on OS X Cocoa and Carbon Tks and on X11 Tks if insertwidth is also set on the insertborderwidth tests. That would need to be tested with Windows Tk. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2014年02月01日 07:02:11 | ned.deily | set | recipients:
+ ned.deily, serhiy.storchaka |
| 2014年02月01日 07:02:11 | ned.deily | set | messageid: <1391238131.07.0.720424481499.issue19761@psf.upfronthosting.co.za> |
| 2014年02月01日 07:02:11 | ned.deily | link | issue19761 messages |
| 2014年02月01日 07:02:10 | ned.deily | create |
|