From 7cea44d3cfa216c63c78ee3262989c1a2d563121 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 27 Aug 2014 14:02:36 +0200 Subject: Issue #22042: Fix test_signal on Windows --- Lib/test/test_signal.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py index 812bd90..8f3dde4 100644 --- a/Lib/test/test_signal.py +++ b/Lib/test/test_signal.py @@ -271,8 +271,9 @@ class WakeupFDTests(unittest.TestCase): self.addCleanup(os.close, r2) self.addCleanup(os.close, w2) - os.set_blocking(w1, False) - os.set_blocking(w2, False) + if hasattr(os, 'set_blocking'): + os.set_blocking(w1, False) + os.set_blocking(w2, False) signal.set_wakeup_fd(w1) self.assertEqual(signal.set_wakeup_fd(w2), w1) -- cgit v0.12