From: Victor Stinner Date: Tue, 19 May 2026 14:09:03 +0000 (+0200) Subject: gh-149879: Fix test_tempfile on Cygwin (#150081) X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6372d48a4d5c394a6638741d0c3c849a20161efb;p=thirdparty%2FPython%2Fcpython.git gh-149879: Fix test_tempfile on Cygwin (#150081) On Cygwin, text files are not truncated at the first Ctrl+Z byte. --- diff --git a/Lib/test/test_tempfile.py b/Lib/test/test_tempfile.py index b2b5390af33b..0e00ff1d0cc3 100644 --- a/Lib/test/test_tempfile.py +++ b/Lib/test/test_tempfile.py @@ -511,6 +511,8 @@ class TestMkstempInner(TestBadTempdir, BaseTestCase): 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