Here are the examples of the python api twisted.internet.base.BasePort taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
3
Source : test_unix.py
with MIT License
from autofelix
with MIT License
from autofelix
def test_listenFailure(self):
"""
L{IReactorUNIX.listenUNIX} raises L{CannotListenError} if the
underlying port's createInternetSocket raises a socket error.
"""
def raiseSocketError(self):
raise error('FakeBasePort forced socket.error')
self.patch(base.BasePort, "createInternetSocket", raiseSocketError)
reactor = self.buildReactor()
with self.assertRaises(CannotListenError):
reactor.listenUNIX('not-used', ServerFactory())
def test_connectToLinuxAbstractNamespace(self):