diff options
author | Victor Stinner <vstinner@redhat.com> | 2018-05-31 03:08:42 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-31 03:08:42 (GMT) |
commit | 5d6c7ed5e340b2311a15f34e968d4bef09c71922 (patch) | |
tree | 466e9aa0ddd78739d4ac494c5e5d56b90d4c5b27 /Lib/test/_test_multiprocessing.py | |
parent | 02e2a085dc1740b1cbf4ba2ed77335c84ce8a367 (diff) | |
download | cpython-5d6c7ed5e340b2311a15f34e968d4bef09c71922.zip cpython-5d6c7ed5e340b2311a15f34e968d4bef09c71922.tar.gz cpython-5d6c7ed5e340b2311a15f34e968d4bef09c71922.tar.bz2 |
bpo-33532: Fix multiprocessing test_ignore() (#7262)
Fix test_ignore() of multiprocessing tests like
test_multiprocessing_forkserver: use support.PIPE_MAX_SIZE to make
sure that send_bytes() blocks.
Diffstat (limited to 'Lib/test/_test_multiprocessing.py')
-rw-r--r-- | Lib/test/_test_multiprocessing.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py index 8b6bc4b..2e24e9b 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py @@ -4338,7 +4338,7 @@ class TestIgnoreEINTR(unittest.TestCase): conn.send('ready') x = conn.recv() conn.send(x) - conn.send_bytes(b'x' * (1024 * 1024)) # sending 1 MiB should block + conn.send_bytes(b'x' * support.PIPE_MAX_SIZE) @unittest.skipUnless(hasattr(signal, 'SIGUSR1'), 'requires SIGUSR1') def test_ignore(self): @@ -4357,7 +4357,7 @@ class TestIgnoreEINTR(unittest.TestCase): self.assertEqual(conn.recv(), 1234) time.sleep(0.1) os.kill(p.pid, signal.SIGUSR1) - self.assertEqual(conn.recv_bytes(), b'x'*(1024*1024)) + self.assertEqual(conn.recv_bytes(), b'x' * support.PIPE_MAX_SIZE) time.sleep(0.1) p.join() finally: |