'In this test the writer writes an \'x\' to its fd. The reader
reads it, check the value and ends the test.'

def _testReadWrite(self):

    self.shouldWrite = True
    def checkReadInput(fd):
        self.assertEquals(fd.read(1), 'x')
        self._reactor.stop()
    def writeOnce(fd):
        if self.shouldWrite:
            self.shouldWrite = False
            fd.write('x')
    self._reader = Reader(self._p1, checkReadInput)
    self._writer = Writer(self._p2, writeOnce)
    self._reactor.addWriter(self._writer)
    self._reactor.addReader(self._reader)
    self._reactor.addReader(self._reader)
