https://github.com/python/cpython/commit/6372d48a4d5c394a6638741d0c3c849a20161efb
commit: 6372d48a4d5c394a6638741d0c3c849a20161efb
branch: main
author: Victor Stinner <[email protected]>
committer: vstinner <[email protected]>
date: 2026-05-19T16:09:03+02:00
summary:

gh-149879: Fix test_tempfile on Cygwin (#150081)

On Cygwin, text files are not truncated at the first Ctrl+Z byte.

files:
M Lib/test/test_tempfile.py

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
 

_______________________________________________
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