summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tcl.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2022-05-06 10:50:38 (GMT)
committerGitHub <noreply@github.com>2022-05-06 10:50:38 (GMT)
commit15dbe8570f215bfb4910cdd79b43dafb2ab6b38f (patch)
tree4bd84c0560fba0aea940aa74056ae57ea987d970 /Lib/test/test_tcl.py
parentd707d073be5ecacb7ad341a1c1716f4998907d6b (diff)
downloadcpython-15dbe8570f215bfb4910cdd79b43dafb2ab6b38f.zip
cpython-15dbe8570f215bfb4910cdd79b43dafb2ab6b38f.tar.gz
cpython-15dbe8570f215bfb4910cdd79b43dafb2ab6b38f.tar.bz2
gh-91827: Add method info_pathlevel() in tkinter (GH-91829)
Diffstat (limited to 'Lib/test/test_tcl.py')
-rw-r--r--Lib/test/test_tcl.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
index e73ad59..5489147 100644
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -28,15 +28,7 @@ def get_tk_patchlevel():
global _tk_patchlevel
if _tk_patchlevel is None:
tcl = Tcl()
- patchlevel = tcl.call('info', 'patchlevel')
- m = re.fullmatch(r'(\d+)\.(\d+)([ab.])(\d+)', patchlevel)
- major, minor, releaselevel, serial = m.groups()
- major, minor, serial = int(major), int(minor), int(serial)
- releaselevel = {'a': 'alpha', 'b': 'beta', '.': 'final'}[releaselevel]
- if releaselevel == 'final':
- _tk_patchlevel = major, minor, serial, releaselevel, 0
- else:
- _tk_patchlevel = major, minor, 0, releaselevel, serial
+ _tk_patchlevel = tcl.info_patchlevel()
return _tk_patchlevel
@@ -723,7 +715,7 @@ class BigmemTclTest(unittest.TestCase):
def setUpModule():
if support.verbose:
tcl = Tcl()
- print('patchlevel =', tcl.call('info', 'patchlevel'))
+ print('patchlevel =', tcl.call('info', 'patchlevel'), flush=True)
if __name__ == "__main__":