def METHOD_NAME(self):
    buf = []
    timeout = 1.0
    def read():
        buf.append(pipe.read())
    def write(content):
        pipe.write(content)
    pipe = Pipe()
    pipe.write('first')
    thread = in_thread(write, ('second',))
    thread.join(timeout)
    self.assertEqual(True, thread.is_alive())
    self.assertEqual('first', pipe.read())
    self.assertEqual('second', pipe.read())
    thread.join(timeout)
    self.assertEqual(False, thread.is_alive())
    thread = in_thread(read)
    thread.join(timeout)
    self.assertEqual(True, thread.is_alive())
    pipe.write('third')
    thread.join(timeout)
    self.assertEqual(False, thread.is_alive())
    self.assertEqual(['third'], buf)