From 8ab01a7c749adad720365da0a074badec6cc2bd8 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 19 May 2026 14:56:58 +0200 Subject: [PATCH] gh-149879: Fix test_tempfile on Cygwin On Cygwin, text files are not truncated at the first Ctrl+Z byte. --- Lib/test/test_tempfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/test_tempfile.py b/Lib/test/test_tempfile.py index b2b5390af33b00..0e00ff1d0cc366 100644 --- a/Lib/test/test_tempfile.py +++ b/Lib/test/test_tempfile.py @@ -511,6 +511,8 @@ def test_noinherit(self): self.assertFalse(retval > 0, "child process reports failure %d"%retval) @unittest.skipUnless(has_textmode, "text mode not available") + @unittest.skipIf(sys.platform == "cygwin", + "truncate text mode is not supported on Cygwin") def test_textmode(self): # _mkstemp_inner can create files in text mode