Known subclasses: twisted.pair.test.test_tuntap.FakeTapDeviceTests, twisted.pair.test.test_tuntap.FakeTapDeviceWithPITests, twisted.pair.test.test_tuntap.FakeTunDeviceTests, twisted.pair.test.test_tuntap.RealDeviceWithoutProtocolInformationTests, twisted.pair.test.test_tuntap.RealDeviceWithProtocolInformationTests

A mixin defining tests that apply to _IInputOutputSystem implementations.

Method setUp Create the _IInputOutputSystem provider under test and open a tunnel using it.
Method test_interface The object under test provides _IInputOutputSystem.
Method test_readEBADF The device's read implementation raises OSError with an errno of EBADF when called on a file descriptor which is not valid (ie, which has no associated file description).
Method test_writeEBADF The device's write implementation raises OSError with an errno of EBADF when called on a file descriptor which is not valid (ie, which has no associated file description).
Method test_closeEBADF The device's close implementation raises OSError with an errno of EBADF when called on a file descriptor which is not valid (ie, which has no associated file description).
Method test_ioctlEBADF The device's ioctl implementation raises OSError with an errno of EBADF when called on a file descriptor which is not valid (ie, which has no associated file description).
Method test_ioctlEINVAL The device's ioctl implementation raises IOError with an errno of EINVAL when called with a request (second argument) which is not a supported operation.
Method test_receive If a UDP datagram is sent to an address reachable by the tunnel device then it can be read out of the tunnel device.
Method test_send If a UDP datagram is written the tunnel device then it is received by the network to which it is addressed.
Method _invalidFileDescriptor Get an invalid file descriptor.
def setUp(self):

Create the _IInputOutputSystem provider under test and open a tunnel using it.

def test_interface(self):

The object under test provides _IInputOutputSystem.

def _invalidFileDescriptor(self):

Get an invalid file descriptor.

ReturnsAn integer which is not a valid file descriptor at the time of this call. After any future system call which allocates a new file descriptor, there is no guarantee the returned file descriptor will still be invalid.
def test_readEBADF(self):

The device's read implementation raises OSError with an errno of EBADF when called on a file descriptor which is not valid (ie, which has no associated file description).

def test_writeEBADF(self):

The device's write implementation raises OSError with an errno of EBADF when called on a file descriptor which is not valid (ie, which has no associated file description).

def test_closeEBADF(self):

The device's close implementation raises OSError with an errno of EBADF when called on a file descriptor which is not valid (ie, which has no associated file description).

def test_ioctlEBADF(self):

The device's ioctl implementation raises OSError with an errno of EBADF when called on a file descriptor which is not valid (ie, which has no associated file description).

def test_ioctlEINVAL(self):

The device's ioctl implementation raises IOError with an errno of EINVAL when called with a request (second argument) which is not a supported operation.

def test_receive(self):

If a UDP datagram is sent to an address reachable by the tunnel device then it can be read out of the tunnel device.

def test_send(self):

If a UDP datagram is written the tunnel device then it is received by the network to which it is addressed.

API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.