def METHOD_NAME(self):
    """test StreamWorker with timeout set on open stream"""
    # Create worker set with timeout
    worker = StreamWorker(handler=None, timeout=0.5)
    # Create pipe stream
    rfd1, wfd1 = os.pipe()
    worker.set_reader("pipe1", rfd1, closefd=False)
    # Write some chars without line break (worst case)
    os.write(wfd1, "Some data")
    # TEST: Do not close wfd1 to simulate open stream
    # Need to enable pipe1_msgtree
    task_self().set_default("pipe1_msgtree", True)
    self.run_worker(worker)
    # Timeout occured - read buffer should have been flushed
    self.assertEqual(worker.read(sname="pipe1"), "Some data")
    # closefd was set, we should be able to close pipe fds
    os.close(rfd1)
    os.close(wfd1)