Charles-François Natali <neolo...@free.fr> added the comment: > Do you want to call the function with two arguments or one tuple with 2 > items? You may test both :-)
The former. Fixed. > Hum, I'm not sure that it's revelant to test the time I didn't like it either, I just reused what's done in test_socket. Fixed. > BaseTestCase.test_communicate_pipe_buf() on subprocess uses Yeah, except that it doesn't work, POSIX's PIPE_BUF is the guaranteed limit for the write to be atomic, not the buffer size (furthermore the libc doesn't have any way to know the pipe's buffer size or max atomic write, it's just a defined constant). $ cat /tmp/test_pipe.py import os r, w = os.pipe() max = os.fpathconf(w, 'PC_PIPE_BUF') print(max) os.write(w, 2 * max * b'x') print('ok') $ ./python /tmp/test_pipe.py 4096 ok > This constant should be moved to test.support. Patch attached. It uses a constant of 1MB, even on Windows. I hope it won't break there, you never know with Windows... ---------- Added file: http://bugs.python.org/file22151/support_pipe_max.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12196> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com