Issue #12981: test_multiprocessing: catch ImportError when importing

multiprocessing.reduction, which may not be available (e.g. if the OS doesn't
support FD passing over Unix domain sockets).
This commit is contained in:
Charles-François Natali 2011-09-21 18:49:18 +02:00
commit fba2b6b454

View file

@ -1693,6 +1693,7 @@ class _TestConnection(BaseTestCase):
def _send_data_without_fd(self, conn):
os.write(conn.fileno(), b"\0")
@unittest.skipUnless(HAS_REDUCTION, "test needs multiprocessing.reduction")
@unittest.skipIf(sys.platform == "win32", "doesn't make sense on Windows")
def test_missing_fd_transfer(self):
# Check that exception is raised when received data is not