mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
[3.11] gh-104496: Use correct Tcl or Tk version in Tkinter tests (GH-107688) (GH-107719)
In future Tcl and Tk versions can be desynchronized.
(cherry picked from commit 3c8e8f3cee
)
This commit is contained in:
parent
880670a34f
commit
81c8f7d619
7 changed files with 30 additions and 39 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
import unittest
|
||||
import tkinter
|
||||
from tkinter.test.support import (AbstractTkTest, tcl_version,
|
||||
from tkinter.test.support import (AbstractTkTest, tk_version,
|
||||
pixels_conv, tcl_obj_eq)
|
||||
import test.support
|
||||
|
||||
|
@ -23,7 +23,7 @@ class AbstractWidgetTest(AbstractTkTest):
|
|||
return self._scaling
|
||||
|
||||
def _str(self, value):
|
||||
if not self._stringify and self.wantobjects and tcl_version >= (8, 6):
|
||||
if not self._stringify and self.wantobjects and tk_version >= (8, 6):
|
||||
return value
|
||||
if isinstance(value, tuple):
|
||||
return ' '.join(map(self._str, value))
|
||||
|
@ -157,7 +157,7 @@ class AbstractWidgetTest(AbstractTkTest):
|
|||
'flat', 'groove', 'raised', 'ridge', 'solid', 'sunken')
|
||||
errmsg='bad relief "spam": must be '\
|
||||
'flat, groove, raised, ridge, solid, or sunken'
|
||||
if tcl_version < (8, 6):
|
||||
if tk_version < (8, 6):
|
||||
errmsg = None
|
||||
self.checkInvalidParam(widget, name, 'spam',
|
||||
errmsg=errmsg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue