+
    Dfj                       R t ^ RIHt ^ RIt^ RIt^ RIHt ^ RIHt ^ RI	H
t
Ht ^ RIHt ^ RIHt ^ RIHt ^ R	IHt ^ R
IHt ]! RR4      t]! RR4      t]! RR4      t]! RR4      t ! R R]4      t ! R R]4      t ! R R]4      tR# )z(
Tests for L{twisted.internet.default}.
)annotationsN)Callable)default)_getInstallFunctioninstall)IReactorCore)	NoReactor)requireModule)Platform)SynchronousTestCaseposixotherlinux2ntwin32darwinc                  >    ] tR t^tRtR R ltR R ltR R ltRtR	# )
PollReactorTestsz
Tests for the cases of L{twisted.internet.default._getInstallFunction}
in which it picks the poll(2) or epoll(7)-based reactors.
c                    V ^8  d   QhRRRR/# )   r   zCallable[..., object]returnNone )formats   "D/usr/lib/python3/dist-packages/twisted/internet/test/test_default.py__annotate__PollReactorTests.__annotate__!   s     S S$9 Sd S    c                    \        \        R4      '       d   V P                  VP                  R4       R# V P                  VP                  R4       R# )zb
Assert the given function will install the poll() reactor, or select()
if poll() is unavailable.
pollztwisted.internet.pollreactortwisted.internet.selectreactorN)hasattrselectassertEqual
__module__selfr   s   &&r   assertIsPollPollReactorTests.assertIsPoll!   s?    
 66""W//1OPW//1QRr   c                   V ^8  d   QhRR/# r   r   r   r   )r   s   "r   r   r   +   s     # #4 #r   c                F    \        \        4      pV P                  V4       R# )z~
L{_getInstallFunction} chooses the poll reactor on arbitrary Unix
platforms, falling back to select(2) if it is unavailable.
N)r   unixr'   r%   s   & r   	test_unixPollReactorTests.test_unix+   s    
 &d+'"r   c                   V ^8  d   QhRR/# r*   r   )r   s   "r   r   r   3   s     	R 	RD 	Rr   c                    \        \        4      p\        R4      f   V P                  V4       R# V P	                  VP
                  R4       R# )z]
L{_getInstallFunction} chooses the epoll reactor on Linux, or poll if
epoll is unavailable.
ztwisted.internet.epollreactorN)r   linuxr	   r'   r#   r$   r%   s   & r   
test_linuxPollReactorTests.test_linux3   s?    
 &e,89Ag&W//1PQr   r   N)	__name__r$   __qualname____firstlineno____doc__r'   r-   r2   __static_attributes__r   r   r   r   r      s    
S#	R 	Rr   r   c                  2    ] tR t^?tRtR R ltR R ltRtR# )SelectReactorTestszw
Tests for the cases of L{twisted.internet.default._getInstallFunction}
in which it picks the select(2)-based reactor.
c                   V ^8  d   QhRR/# r*   r   )r   s   "r   r   SelectReactorTests.__annotate__E   s     O O$ Or   c                \    \        \        4      pV P                  VP                  R4       R# )z=
L{_getInstallFunction} chooses the select reactor on macOS.
r    N)r   osxr#   r$   r%   s   & r   test_osxSelectReactorTests.test_osxE   s%     &c*++-MNr   c                   V ^8  d   QhRR/# r*   r   )r   s   "r   r   r<   L   s     O Od Or   c                \    \        \        4      pV P                  VP                  R4       R# )z?
L{_getInstallFunction} chooses the select reactor on Windows.
r    N)r   windowsr#   r$   r%   s   & r   test_windowsSelectReactorTests.test_windowsL   s%     &g.++-MNr   r   N)r4   r$   r5   r6   r7   r?   rD   r8   r   r   r   r:   r:   ?   s    
OO Or   r:   c                  2    ] tR t^TtRtR R ltR R ltRtR# )InstallationTestsz/
Tests for actual installation of the reactor.
c                   V ^8  d   QhRR/# r*   r   )r   s   "r   r   InstallationTests.__annotate__Y   s     C Cd Cr   c                    \        4       ;_uu_ 4        \        4        V P                  R\        P                  4       RRR4       R#   + '       g   i     R# ; i)z 
L{install} installs a reactor.
ztwisted.internet.reactorN)r   r   assertInsysmodules)r&   s   &r   test_installInstallationTests.test_installY   s/     [[IMM4ckkB [[[s   +AA	c                   V ^8  d   QhRR/# r*   r   )r   s   "r   r   rI   a   s     0 0d 0r   c                &  a . oR V3R llpV P                  \        RV4       \        4       ;_uu_ 4        ^ RIHp V P                  \        P                  ! V4      4       V P                  SR.4       RRR4       R#   + '       g   i     R# ; i)zZ
Importing L{twisted.internet.reactor} installs the default reactor if
none is installed.
c                   V ^8  d   QhRR/# )r   r   objectr   )r   s   "r   r   4InstallationTests.test_reactor.<locals>.__annotate__h   s     	 	6 	r   c                 :   < S P                  R 4       \        4       # )T)appendr   )	installeds   r   	installer1InstallationTests.test_reactor.<locals>.installerh   s    T"9r   r   )reactorTN)	patchr   r   twisted.internetrZ   
assertTruer   
providedByr#   )r&   rX   rZ   rW   s   &  @r   test_reactorInstallationTests.test_reactora   se    
 !#		 	 	

7Iy1[[0OOL33G<=Y/	 [[[s   ?A??B	r   N)r4   r$   r5   r6   r7   rN   r_   r8   r   r   r   rG   rG   T   s    C0 0r   rG   )r7   
__future__r   r"   rL   typingr   r\   r   twisted.internet.defaultr   r   twisted.internet.interfacesr   twisted.internet.test.test_mainr   twisted.python.reflectr	   twisted.python.runtimer
   twisted.trial.unittestr   r,   r1   rC   r>   r   r:   rG   r   r   r   <module>ri      s    #  
  $ A 4 5 0 + 6!(#
4
!w!!R* !RHO, O*0+ 0r   