Skip to content

Commit 6372d48

Browse files
authored
gh-149879: Fix test_tempfile on Cygwin (#150081)
On Cygwin, text files are not truncated at the first Ctrl+Z byte.
1 parent ba0aca3 commit 6372d48

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Lib/test/test_tempfile.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,8 @@ def test_noinherit(self):
511511
self.assertFalse(retval > 0, "child process reports failure %d"%retval)
512512

513513
@unittest.skipUnless(has_textmode, "text mode not available")
514+
@unittest.skipIf(sys.platform == "cygwin",
515+
"truncate text mode is not supported on Cygwin")
514516
def test_textmode(self):
515517
# _mkstemp_inner can create files in text mode
516518

0 commit comments

Comments
 (0)