From: Serhiy Storchaka Date: Tue, 30 Jun 2026 14:25:42 +0000 (+0300) Subject: gh-151881: Skip tk_inactive negativity check on Windows (GH-152683) X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2303eea150602874d55d965eb3f83d6e80649118;p=thirdparty%2FPython%2Fcpython.git 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 --- diff --git a/Lib/test/test_tkinter/test_misc.py b/Lib/test/test_tkinter/test_misc.py index e6221f708970..5f75b8d245b3 100644 --- a/Lib/test/test_tkinter/test_misc.py +++ b/Lib/test/test_tkinter/test_misc.py @@ -592,7 +592,10 @@ class MiscTest(AbstractTkTest, unittest.TestCase): 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))