def test_unhandledWriteError(self):
        """
        Any exception raised by the underlying write call, except for EINTR, is
        propagated to the caller.
        """
        self.port.startListening()
        tunnel = self.system.getTunnel(self.port)
        self.assertRaises(
            IOError,
            self.port.write, b"x" * tunnel.SEND_BUFFER_SIZE + b"y")

        Any exception raised by the underlying write call, except for EINTR, is
        propagated to the caller.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/pair/test/test_tuntap.py