diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-08-16 12:32:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-16 12:32:04 (GMT) |
commit | 91d935b47b47f5fa5c3eb0ee5e45a627f79babef (patch) | |
tree | 31583ffd882221422116526d050c6a7d17c10037 /Lib/test/test_tcl.py | |
parent | 220d7e3120ffa23d01f91b7ad89f488b4dda3ef0 (diff) | |
download | cpython-91d935b47b47f5fa5c3eb0ee5e45a627f79babef.zip cpython-91d935b47b47f5fa5c3eb0ee5e45a627f79babef.tar.gz cpython-91d935b47b47f5fa5c3eb0ee5e45a627f79babef.tar.bz2 |
[3.12] gh-104496: Use correct Tcl or Tk version in Tkinter tests (GH-107688) (#107709)
gh-104496: Use correct Tcl or Tk version in Tkinter tests (GH-107688)
In future Tcl and Tk versions can be desynchronized.
(cherry picked from commit 3c8e8f3ceeae08fc43d885f5a4c65a3ee4b1a2c8)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib/test/test_tcl.py')
-rw-r--r-- | Lib/test/test_tcl.py | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py index d07b83a..ebdb58f 100644 --- a/Lib/test/test_tcl.py +++ b/Lib/test/test_tcl.py @@ -20,14 +20,6 @@ except ImportError: tcl_version = tuple(map(int, _tkinter.TCL_VERSION.split('.'))) -_tk_patchlevel = None -def get_tk_patchlevel(): - global _tk_patchlevel - if _tk_patchlevel is None: - tcl = Tcl() - _tk_patchlevel = tcl.info_patchlevel() - return _tk_patchlevel - class TkinterTest(unittest.TestCase): @@ -571,7 +563,6 @@ class TclTest(unittest.TestCase): (1, '2', (3.4,)) if self.wantobjects else ('1', '2', '3.4')), ] - tk_patchlevel = get_tk_patchlevel() if not self.wantobjects: expected = ('12', '\u20ac', '\xe2\x82\xac', '3.4') else: @@ -580,8 +571,8 @@ class TclTest(unittest.TestCase): (call('dict', 'create', 12, '\u20ac', b'\xe2\x82\xac', (3.4,)), expected), ] - dbg_info = ('want objects? %s, Tcl version: %s, Tk patchlevel: %s' - % (self.wantobjects, tcl_version, tk_patchlevel)) + dbg_info = ('want objects? %s, Tcl version: %s, Tcl patchlevel: %s' + % (self.wantobjects, tcl_version, self.interp.info_patchlevel())) for arg, res in testcases: self.assertEqual(splitlist(arg), res, 'arg=%a, %s' % (arg, dbg_info)) |