%PDF- %PDF-
Direktori : /lib/python3/dist-packages/twisted/application/test/__pycache__/ |
Current File : //lib/python3/dist-packages/twisted/application/test/__pycache__/test_internet.cpython-312.pyc |
� Ϫ�fM� � � � d Z ddlZddlmZ ddlmZ ddlmZ ddlm Z m Z mZ ddlm Z ddlmZmZ dd lmZmZmZmZmZ dd lmZmZ ddlmZ ddlmZ dd lmZm Z ddl!m"Z" ddl#m$Z$m%Z% d� Z& ee� G d� d� � Z' eee'� ee� G d� d� � Z( eee'� G d� de%� Z) G d� de%� Z* G d� d� Z+d d�Z,e fd�Z-dZ. G d� de$� Z/y)!z� Tests for (new code in) L{twisted.application.internet}. @var AT_LEAST_ONE_ATTEMPT: At least enough seconds for L{ClientService} to make one attempt. � N)�implementer)�verifyClass)�internet)� ClientService�StreamServerEndpointService�TimerService)�task)�CancelledError�Deferred)�IFileDescriptorReceiver�IHalfCloseableProtocol�IListeningPort�IStreamClientEndpoint�IStreamServerEndpoint)�Factory�Protocol)�Clock)�StringTransport)�formatEvent�globalLogPublisher)�Failure)�SynchronousTestCase�TestCasec � � y)zM A fake target function for testing TimerService which does nothing. N� r � �H/usr/lib/python3/dist-packages/twisted/application/test/test_internet.py�fakeTargetFunctionr ) s � � r c �F � e Zd ZdZdZdZdZ e� ZdZ d� Z d� Zd� Zd� Z y)� FakeServeraq In-memory implementation of L{IStreamServerEndpoint}. @ivar result: The L{Deferred} resulting from the call to C{listen}, after C{listen} has been called. @ivar factory: The factory passed to C{listen}. @ivar cancelException: The exception to errback C{self.result} when it is cancelled. @ivar port: The L{IListeningPort} which C{listen}'s L{Deferred} will fire with. @ivar listenAttempts: The number of times C{listen} has been invoked. @ivar failImmediately: If set, the exception to fail the L{Deferred} returned from C{listen} before it is returned. Nr c �"