diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2011-09-19 10:26:31 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2011-09-19 10:26:31 (GMT) |
commit | 2496f331a75c9dd30ef8588ae86179131227163a (patch) | |
tree | 90dd7c0d28d2a0196a9a2c60f097ea32b65aaba4 /Lib/test/test_socket.py | |
parent | b1e5d595afd15d3b84600883a5b60d1fbc6882e6 (diff) | |
download | cpython-2496f331a75c9dd30ef8588ae86179131227163a.zip cpython-2496f331a75c9dd30ef8588ae86179131227163a.tar.gz cpython-2496f331a75c9dd30ef8588ae86179131227163a.tar.bz2 |
Close issue 12958 by flagging expected failures in test_socket on Mac OS X
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r-- | Lib/test/test_socket.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 83351b9..f47e61e 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -167,6 +167,9 @@ class ThreadableTest: raise TypeError("test_func must be a callable function") try: test_func() + except unittest._ExpectedFailure: + # We deliberately ignore expected failures + pass except BaseException as e: self.queue.put(e) finally: @@ -2090,6 +2093,8 @@ class SCMRightsTest(SendrecvmsgServerTimeoutBase): def _testFDPassCMSG_LEN(self): self.createAndSendFDs(1) + # Issue #12958: The following test has problems on Mac OS X + @support.anticipate_failure(sys.platform == "darwin") @requireAttrs(socket, "CMSG_SPACE") def testFDPassSeparate(self): # Pass two FDs in two separate arrays. Arrays may be combined @@ -2099,6 +2104,7 @@ class SCMRightsTest(SendrecvmsgServerTimeoutBase): maxcmsgs=2) @testFDPassSeparate.client_skip + @support.anticipate_failure(sys.platform == "darwin") def _testFDPassSeparate(self): fd0, fd1 = self.newFDs(2) self.assertEqual( @@ -2110,6 +2116,8 @@ class SCMRightsTest(SendrecvmsgServerTimeoutBase): array.array("i", [fd1]))]), len(MSG)) + # Issue #12958: The following test has problems on Mac OS X + @support.anticipate_failure(sys.platform == "darwin") @requireAttrs(socket, "CMSG_SPACE") def testFDPassSeparateMinSpace(self): # Pass two FDs in two separate arrays, receiving them into the @@ -2121,6 +2129,7 @@ class SCMRightsTest(SendrecvmsgServerTimeoutBase): maxcmsgs=2, ignoreflags=socket.MSG_CTRUNC) @testFDPassSeparateMinSpace.client_skip + @support.anticipate_failure(sys.platform == "darwin") def _testFDPassSeparateMinSpace(self): fd0, fd1 = self.newFDs(2) self.assertEqual( @@ -3024,9 +3033,12 @@ class InterruptedSendTimeoutTest(InterruptedTimeoutBase, self.assertNotIsInstance(cm.exception, socket.timeout) self.assertEqual(cm.exception.errno, errno.EINTR) + # Issue #12958: The following tests have problems on Mac OS X + @support.anticipate_failure(sys.platform == "darwin") def testInterruptedSendTimeout(self): self.checkInterruptedSend(self.serv_conn.send, b"a"*512) + @support.anticipate_failure(sys.platform == "darwin") def testInterruptedSendtoTimeout(self): # Passing an actual address here as Python's wrapper for # sendto() doesn't allow passing a zero-length one; POSIX @@ -3035,6 +3047,7 @@ class InterruptedSendTimeoutTest(InterruptedTimeoutBase, self.checkInterruptedSend(self.serv_conn.sendto, b"a"*512, self.serv_addr) + @support.anticipate_failure(sys.platform == "darwin") @requireAttrs(socket.socket, "sendmsg") def testInterruptedSendmsgTimeout(self): self.checkInterruptedSend(self.serv_conn.sendmsg, [b"a"*512]) |