]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-149879: Fix test_ftplib on Cygwin (#150431)
authorVictor Stinner <vstinner@python.org>
Mon, 25 May 2026 22:09:41 +0000 (00:09 +0200)
committerGitHub <noreply@github.com>
Mon, 25 May 2026 22:09:41 +0000 (00:09 +0200)
Skip test_abort() since MSG_OOB doesn't work properly on Cygwin. The
server gets b'\n' and then b'ABOR\r', instead of getting b'ABOR\r\n'.

Lib/test/test_ftplib.py

index f1eff9430f7351c4906b696c4440c8875d728f92..983a8b92cf6384d941db609456dd3a6b52d779de 100644 (file)
@@ -8,6 +8,7 @@ import socket
 import io
 import errno
 import os
+import sys
 import threading
 import time
 import unittest
@@ -590,6 +591,8 @@ class TestFTPClass(TestCase):
         # Ensure the connection gets closed; sock attribute should be None
         self.assertEqual(self.client.sock, None)
 
+    @unittest.skipIf(sys.platform == 'cygwin',
+                     "MSG_OOB doesn't work properly on Cygwin")
     def test_abort(self):
         self.client.abort()