def test_otherReadError(self):
        """
        L{main} only ignores C{IOError} with C{EINTR} errno: otherwise, the
        error pops out.
        """

        class FakeStream(object):
            count = 0

            def read(oself, size):
                oself.count += 1
                if oself.count == 1:
                    raise IOError("Something else")
                return ''

        self.readStream = FakeStream()
        self.assertRaises(IOError, main, self.fdopen)

        L{main} only ignores C{IOError} with C{EINTR} errno: otherwise, the
        error pops out.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/_dist/test/test_workertrial.py