https://github.com/python/cpython/commit/2303eea150602874d55d965eb3f83d6e80649118
commit: 2303eea150602874d55d965eb3f83d6e80649118
branch: main
author: Serhiy Storchaka <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2026-06-30T14:25:42Z
summary:

gh-151881: Skip tk_inactive negativity check on Windows (GH-152683)

On Windows the inactivity time can overflow to a negative value
(Tk ticket 3cb7c4ac72d4).

Co-authored-by: Claude Opus 4.8 <[email protected]>

files:
M Lib/test/test_tkinter/test_misc.py

diff --git a/Lib/test/test_tkinter/test_misc.py 
b/Lib/test/test_tkinter/test_misc.py
index e6221f7089704d..5f75b8d245b3e9 100644
--- a/Lib/test/test_tkinter/test_misc.py
+++ b/Lib/test/test_tkinter/test_misc.py
@@ -592,7 +592,10 @@ def test_tk_inactive(self):
         ms = self.root.tk_inactive()
         self.assertIsInstance(ms, int)
         # A count of milliseconds, or -1 if the windowing system lacks support.
-        self.assertGreaterEqual(ms, -1)
+        if self.root._windowingsystem != 'win32':
+            # On Windows the value can overflow to a negative number
+            # (Tk ticket 3cb7c4ac72d4).
+            self.assertGreaterEqual(ms, -1)
         # Resetting the timer returns None and does not raise.
         self.assertIsNone(self.root.tk_inactive(reset=True))
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to