'Writing to an IPv6 address on an IPv4 socket will raise an
L{InvalidAddressError}.'

@skipWithoutIPv6
def test_writingToIPv6OnIPv4RaisesInvalidAddressError(self):

    reactor = self.buildReactor()
    port = self.getListeningPort(reactor, DatagramProtocol(), interface='127.0.0.1')
    self.assertRaises(error.InvalidAddressError, port.write, 'spam', ('::1', 1))
