test_poll: add note about unbuffered fdopen
authorZac Medico <zmedico@gentoo.org>
Fri, 16 Dec 2011 22:26:01 +0000 (14:26 -0800)
committerZac Medico <zmedico@gentoo.org>
Fri, 16 Dec 2011 22:26:01 +0000 (14:26 -0800)
pym/portage/tests/process/test_poll.py

index f1ddcb3dd323d7c81c2f014e8f7b3566e2ebc5d7..30816db2bca2ff57210cbfb4ae433fc897a85a57 100644 (file)
@@ -25,6 +25,9 @@ class PipeReaderTestCase(TestCase):
                else:
                        got_pty = False
                        master_fd, slave_fd = os.pipe()
+
+               # WARNING: It is very important to use unbuffered mode here,
+               # in order to avoid issue 5380 with python3.
                master_file = os.fdopen(master_fd, 'rb', 0)
                slave_file = os.fdopen(slave_fd, 'wb', 0)
                producer = SpawnProcess(