changeset: 88947:036671354dc0 parent: 88945:a5a622309a0b parent: 88946:63efacd80f8e user: Ned Deily date: Mon Feb 03 14:02:26 2014 -0800 files: Lib/test/test_socket.py Misc/NEWS description: Issue #20474: Fix "unexpected success" test_socket failures on OS X 10.7+. diff -r a5a622309a0b -r 036671354dc0 Lib/test/test_socket.py --- a/Lib/test/test_socket.py Mon Feb 03 22:32:00 2014 +0200 +++ b/Lib/test/test_socket.py Mon Feb 03 14:02:26 2014 -0800 @@ -3635,12 +3635,12 @@ 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 @@ -3649,7 +3649,7 @@ 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]) diff -r a5a622309a0b -r 036671354dc0 Misc/NEWS --- a/Misc/NEWS Mon Feb 03 22:32:00 2014 +0200 +++ b/Misc/NEWS Mon Feb 03 14:02:26 2014 -0800 @@ -106,6 +106,8 @@ - Issue #19990: Added tests for the imghdr module. Based on patch by Claudiu Popa. +- Issue #20474: Fix test_socket "unexpected success" failures on OS X 10.7+. + Tools/Demos -----------