%PDF- %PDF-
Direktori : /usr/lib/python3/dist-packages/twisted/test/__pycache__/ |
Current File : //usr/lib/python3/dist-packages/twisted/test/__pycache__/test_internet.cpython-312.pyc |
� Ϫ�f�� � � � d Z ddlZddlZddlZddlmZ ddlmZmZm Z m Z mZmZm Z ddlmZmZ ddlmZ ddlmZ ddlmZ dd lmZ eZerej4 sdZ G d � de� Z G d� d e� Z G d� de� Z G d� de� Z G d� de� ZdZ G d� dejB � Z" e ejF e d� d� G d� de� � Z$ e ejJ e d� d� G d� de� � Z& G d� dejN � Z( G d� d ejR � Z* G d!� d"e� Z+ G d#� d$� Z, G d%� d&ejZ � Z. G d'� d(e,� Z/ G d)� d*e� Z0 G d+� d,e� Z1 G d-� d.e� Z2y# e$ r dZY ��;w xY w)/zB Tests for lots of functionality provided by L{twisted.internet}. � N)�skipIf)�abstract�base�defer�error� interfaces�protocol�reactor)�Deferred�passthru)� Connector)�util)�TestCase)�sslc � � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z d� Z d � Zd � Zd� Z d� Zd � Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zy)�ThreePhaseEventTestszQ Tests for the private implementation helpers for system event triggers. c �d � d� | _ t � | _ t j � | _ y)zR Create a trigger, an argument, and an event to be used by tests. c � � y �N� )�xs �</usr/lib/python3/dist-packages/twisted/test/test_internet.py�<lambda>z,ThreePhaseEventTests.setUp.<locals>.<lambda>( � � � N)�trigger�object�argr �_ThreePhaseEvent�event��selfs r �setUpzThreePhaseEventTests.setUp$ s$ � � &����8����*�*�,�� r c � � | j t | j j d| j | j � y)zt L{_ThreePhaseEvent.addTrigger} should raise L{KeyError} when called with an invalid phase. �xxxN)�assertRaises�KeyErrorr � addTriggerr r r! s r �test_addInvalidPhasez)ThreePhaseEventTests.test_addInvalidPhase, s/ � � ����d�j�j�+�+�U�D�L�L�$�(�(� r c �� � | j j d| j | j � | j | j j | j | j fi fg� y)z� L{_ThreePhaseEvent.addTrigger} should accept C{'before'} as a phase, a callable, and some arguments and add the callable with the arguments to the before list. �beforeN)r r( r r �assertEqualr+ r! s r �test_addBeforeTriggerz*ThreePhaseEventTests.test_addBeforeTrigger5 �P � � � � ���h����d�h�h�?�������*�*�d�l�l�T�X�X�K��-L�,M�Nr c �� � | j j d| j | j � | j | j j | j | j fi fg� y)z� L{_ThreePhaseEvent.addTrigger} should accept C{'during'} as a phase, a callable, and some arguments and add the callable with the arguments to the during list. �duringN)r r( r r r, r0 r! s r �test_addDuringTriggerz*ThreePhaseEventTests.test_addDuringTrigger>