From 8f0bddad308f8c52bf16e3f90a864b2a168e3291 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sat, 17 Aug 2013 21:43:47 +0200 Subject: Make test_wakeup_write_error more robust (trying to fix a failure on the FreeBSD 9.0 buildbot) --- Lib/test/test_signal.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py index 0564740..3530d8a 100644 --- a/Lib/test/test_signal.py +++ b/Lib/test/test_signal.py @@ -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) -- cgit v0.12