[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:
Serhiy Storchaka 2023-08-07 17:48:43 +03:00 committed by GitHub
parent 880670a34f
commit 81c8f7d619
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 30 additions and 39 deletions

View file

@ -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)