]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Make test_wakeup_write_error more robust
authorAntoine Pitrou <solipsis@pitrou.net>
Sat, 17 Aug 2013 19:43:47 +0000 (21:43 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Sat, 17 Aug 2013 19:43:47 +0000 (21:43 +0200)
(trying to fix a failure on the FreeBSD 9.0 buildbot)

Lib/test/test_signal.py

index 0564740abca1518bacf453b39a15a07f51ed40a6..3530d8a14ed55210dd5e70fb6483fe4d9f1f476e 100644 (file)
@@ -313,6 +313,16 @@ class WakeupSignalTests(unittest.TestCase):
         else:
             raise AssertionError("ZeroDivisionError not raised")
         """
+        r, w = os.pipe()
+        try:
+            os.write(r, b'x')
+        except OSError:
+            pass
+        else:
+            self.skipTest("OS doesn't report write() error on the read end of a pipe")
+        finally:
+            os.close(r)
+            os.close(w)
 
         assert_python_ok('-c', code)