def test_exhaustRaisesOSError(self):
        """
        An L{OSError} raised within
        L{_ExhaustsFileDescriptors.exhaust} with an C{errno} other
        than C{EMFILE} is reraised to the caller.
        """
        def raiseOSError():
            raise OSError(errno.EMFILE + 1, "Not EMFILE")

        exhauster = _ExhaustsFileDescriptors(raiseOSError)
        self.assertRaises(OSError, exhauster.exhaust)

        An L{OSError} raised within
        L{_ExhaustsFileDescriptors.exhaust} with an C{errno} other
        than C{EMFILE} is reraised to the caller.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_tcp.py