Ticket #5521: required-interfaces.patch
| File required-interfaces.patch, 5.6 KB (added by exarkun, 15 months ago) |
|---|
-
twisted/internet/test/test_tcp.py
22 22 from twisted.internet.error import ConnectionDone, ConnectionAborted 23 23 from twisted.internet.interfaces import ( 24 24 ILoggingContext, IResolverSimple, IConnector, IReactorFDSet, 25 ITLSTransport )25 ITLSTransport, IReactorTCP) 26 26 from twisted.internet.address import IPv4Address, IPv6Address 27 27 from twisted.internet.defer import ( 28 28 Deferred, DeferredList, succeed, fail, maybeDeferred, gatherResults) … … 416 416 """ 417 417 Builder defining tests relating to L{IReactorTCP.connectTCP}. 418 418 """ 419 requiredInterfaces = (IReactorTCP,) 420 419 421 def serverEndpoint(self, reactor): 420 422 """ 421 423 Create a L{TCP4ServerEndpoint} listening on localhost on a … … 740 742 """ 741 743 Tests for L{IReactorTCP.listenTCP} 742 744 """ 745 requiredInterfaces = (IReactorTCP,) 746 743 747 def getListeningPort(self, reactor, factory): 744 748 """ 745 749 Get a TCP port from a reactor. … … 1064 1068 """ 1065 1069 Builder defining tests relating to L{twisted.internet.tcp.Connection}. 1066 1070 """ 1071 requiredInterfaces = (IReactorTCP,) 1072 1067 1073 def test_stopStartReading(self): 1068 1074 """ 1069 1075 This test verifies transport socket read state after multiple … … 1213 1219 @ivar server: the listening server factory to be used in tests. 1214 1220 @type server: L{MyServerFactory} 1215 1221 """ 1222 requiredInterfaces = (IReactorTCP,) 1223 1216 1224 def setUp(self): 1217 1225 server = MyServerFactory() 1218 1226 server.protocolConnectionMade = Deferred() … … 2038 2046 TCP-specific L{AbortConnectionMixin} tests. 2039 2047 """ 2040 2048 2049 requiredInterfaces = (IReactorTCP,) 2050 2041 2051 def listen(self, reactor, server): 2042 2052 """ 2043 2053 Listen with the given protocol factory. -
twisted/internet/test/test_threads.py
13 13 from twisted.python.threadable import isInIOThread 14 14 from twisted.internet.test.reactormixins import ReactorBuilder 15 15 from twisted.python.threadpool import ThreadPool 16 from twisted.internet.interfaces import IReactorThreads 16 17 17 18 18 19 class ThreadTestsBuilder(ReactorBuilder): 19 20 """ 20 21 Builder for defining tests relating to L{IReactorThreads}. 21 22 """ 23 requiredInterfaces = (IReactorThreads,) 24 22 25 def test_getThreadPool(self): 23 26 """ 24 27 C{reactor.getThreadPool()} returns an instance of L{ThreadPool} which -
twisted/internet/test/test_time.py
9 9 10 10 from twisted.python.runtime import platform 11 11 from twisted.internet.test.reactormixins import ReactorBuilder 12 from twisted.internet.interfaces import IReactorTime 12 13 13 14 14 15 class TimeTestsBuilder(ReactorBuilder): 15 16 """ 16 17 Builder for defining tests relating to L{IReactorTime}. 17 18 """ 19 requiredInterfaces = (IReactorTime,) 20 18 21 def test_delayedCallStopsReactor(self): 19 22 """ 20 23 The reactor can be stopped by a delayed call. … … 30 33 Builder for defining tests relating to L{IReactorTime} for reactors based 31 34 off glib. 32 35 """ 36 requiredInterfaces = (IReactorTime,) 37 33 38 if platform.isWindows(): 34 39 _reactors = ["twisted.internet.gtk2reactor.PortableGtkReactor"] 35 40 else: -
twisted/internet/test/test_udp.py
16 16 from twisted.python.log import ILogContext, err 17 17 from twisted.internet.test.reactormixins import ReactorBuilder 18 18 from twisted.internet.defer import Deferred, maybeDeferred 19 from twisted.internet.interfaces import ILoggingContext, IListeningPort 19 from twisted.internet.interfaces import ( 20 ILoggingContext, IListeningPort, IReactorUDP) 20 21 from twisted.internet.address import IPv4Address 21 22 from twisted.internet.protocol import DatagramProtocol 22 23 … … 133 134 """ 134 135 Builder defining tests relating to L{IReactorUDP.listenUDP}. 135 136 """ 137 requiredInterfaces = (IReactorUDP,) 138 136 139 def test_interface(self): 137 140 """ 138 141 L{IReactorUDP.listenUDP} returns an object providing L{IListeningPort}. -
twisted/internet/test/test_unix.py
63 63 """ 64 64 Builder defining tests relating to L{IReactorUNIX}. 65 65 """ 66 requiredInterfaces = (interfaces.IReactorUNIX,) 67 66 68 def serverEndpoint(self, reactor): 67 69 """ 68 70 Construct a UNIX server endpoint. … … 132 134 """ 133 135 Builder defining tests relating to L{IReactorUNIXDatagram}. 134 136 """ 137 requiredInterfaces = (interfaces.IReactorUNIXDatagram,) 138 135 139 # There's no corresponding test_connectMode because the mode parameter to 136 140 # connectUNIXDatagram has been completely ignored since that API was first 137 141 # introduced. … … 164 168 """ 165 169 Tests for L{IReactorUNIX.listenUnix} 166 170 """ 167 requiredInterfaces = [interfaces.IReactorUNIX]171 requiredInterfaces = (interfaces.IReactorUNIX,) 168 172 169 173 def getListeningPort(self, reactor, factory): 170 174 """
