'An implementation of L{IReactorSocket.adoptStreamPort} raises
L{UnsupportedAddressFamily} if passed an address family it does not
support.'

def test_invalidAddressFamily(self):

    reactor = self.buildReactor()
    port = socket.socket()
    port.bind(('127.0.0.1', 0))
    port.listen(1)
    self.addCleanup(port.close)
    arbitrary = ((2 ** 16) + 7)
    self.assertRaises(UnsupportedAddressFamily, reactor.adoptStreamPort, port.fileno(), arbitrary, ServerFactory())
