]> granicus.if.org Git - python/commitdiff
Issue #20474: Fix "unexpected success" test_socket failures on OS X 10.7+.
authorNed Deily <nad@acm.org>
Mon, 3 Feb 2014 21:58:31 +0000 (13:58 -0800)
committerNed Deily <nad@acm.org>
Mon, 3 Feb 2014 21:58:31 +0000 (13:58 -0800)
Lib/test/test_socket.py
Misc/NEWS

index f696fe17cd2a018b8ce5c91e294397aeb804bac1..001712f57e99aa090eb12d229a9452efeff825bc 100644 (file)
@@ -3490,12 +3490,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")
+    # Issue #12958: The following tests have problems on OS X prior to 10.7
+    @support.requires_mac_ver(10, 7)
     def testInterruptedSendTimeout(self):
         self.checkInterruptedSend(self.serv_conn.send, b"a"*512)
 
-    @support.anticipate_failure(sys.platform == "darwin")
+    @support.requires_mac_ver(10, 7)
     def testInterruptedSendtoTimeout(self):
         # Passing an actual address here as Python's wrapper for
         # sendto() doesn't allow passing a zero-length one; POSIX
@@ -3504,7 +3504,7 @@ class InterruptedSendTimeoutTest(InterruptedTimeoutBase,
         self.checkInterruptedSend(self.serv_conn.sendto, b"a"*512,
                                   self.serv_addr)
 
-    @support.anticipate_failure(sys.platform == "darwin")
+    @support.requires_mac_ver(10, 7)
     @requireAttrs(socket.socket, "sendmsg")
     def testInterruptedSendmsgTimeout(self):
         self.checkInterruptedSend(self.serv_conn.sendmsg, [b"a"*512])
index 3c078bde2a63a5030514777dc032bba0ffd20449..953ceed575a04285993963d6c78f5210cf1bfb5d 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -365,6 +365,8 @@ Tests
 
 - Issue #19085: Added basic tests for all tkinter widget options.
 
+- Issue #20474: Fix test_socket "unexpected success" failures on OS X 10.7+.
+
 Documentation
 -------------