def METHOD_NAME(self):
    """test StreamWorker bound to several pipe readers"""
    streams = { "pipe1_reader": "Some data to read from a pipe",
                "stderr": "Error data to read using special keyword stderr",
                "pipe2_reader": "Other data to read from another pipe",
                "pipe3_reader": "Cool data to read from a third pipe" }
    class TestH(EventHandler):
        def __init__(self, testcase):
            self.snames = set()
            self.testcase = testcase
        def ev_error(self, worker):
            # test that ev_error is called in case of 'stderr' stream name
            self.testcase.assertEqual(worker.current_sname, "stderr")
            self.recv_msg(worker.current_errmsg)
        def ev_read(self, worker):
            self.recv_msg(worker.current_msg)
        def recv_msg(self, msg):
            self.testcase.assertTrue(len(self.snames) < len(streams))
            self.testcase.assertEqual(streams[worker.current_sname], msg)
            self.snames.add(worker.current_sname)
            if len(self.snames) == len(streams):
                # before finishing, try to add another pipe at
                # runtime: this is NOT allowed
                rfd, wfd = os.pipe()
                self.testcase.assertRaises(WorkerError,
                    worker.set_reader, "pipe4_reader", rfd)
                self.testcase.assertRaises(WorkerError,
                    worker.set_writer, "pipe4_writer", wfd)
                os.close(rfd)
                os.close(wfd)
    # create a StreamWorker instance bound to several pipes
    hdlr = TestH(self)
    worker = StreamWorker(handler=hdlr)
    for sname in streams.keys():
        rfd, wfd = os.pipe()
        worker.set_reader(sname, rfd)
        os.write(wfd, streams[sname])
        os.close(wfd)
    self.run_worker(worker)
    # check that all ev_read have been received
    self.assertEqual(set(("pipe1_reader", "pipe2_reader", "pipe3_reader",
                          "stderr")), hdlr.snames)