+
    Dfj                         ^ RI Ht ^ RIHtHt ^ RIHt ^ RIHt ]! ]P                  4       ! R R4      4       t
 ! R R]P                  4      tR	# )
    )implementer)ethernetraw)
components)unittestc                   2   a  ] tR t^
t o R tR tR tRtV tR# )
MyProtocolc                &    \        V4      V n        R # )N)list	expecting)selfr   s   &&A/usr/lib/python3/dist-packages/twisted/pair/test/test_ethernet.py__init__MyProtocol.__init__   s    i    c                    R# )z
Not implemented
N )r   numprotos   &&&r   addProtoMyProtocol.addProto   s    r   c                    V P                   '       g   Q R 4       hV P                   P                  ^ 4      p\        4       pRVRVRVRV/pWaV38X  g   Q RP                  WaV34      4       hR# )z(Got a packet when not expecting anymore.partialdestsourceprotocolzExpected {!r}, got {!r}N)r   poplocalsformat)	r   datar   r   r   r   expectlocalVariablesparamss	   &&&&&&   r   datagramReceivedMyProtocol.datagramReceived   sz    ~~~III~##A&wDf	
 ' 	
)B)I)I6N*
 	
'r   )r   N)	__name__
__module____qualname____firstlineno__r   r   r$   __static_attributes____classdictcell____classdict__s   @r   r	   r	   
   s     )

 
r   r	   c                   V   a  ] tR t^#t o R tR tR tR tR tR t	R t
R tR	 tR
tV tR# )EthernetTestsc                    \         P                  ! 4       p\        R R^ RRRRRR/3.4      pVP                  RV4       VP	                  R^ R	7       VP
                  '       d   Q R
VP
                  ,          4       hR# )   foobarr   r      123456r      987654r         123456987654 foobarr   5Should not expect any more packets, but still want %rNr   EthernetProtocolr	   r   r$   r   r   r   p1s   &  r   testPacketParsingEthernetTests.testPacketParsing$   s    ))+ !1	 )"F	

 	vr"<aH<<< 	
CbllR	
<r   c                6   \         P                  ! 4       p\        R R^ RRRRRR/3RR^RR	RR
RR/3.4      pVP                  RV4       VP	                  R^ R7       VP	                  R^R7       VP
                  '       d   Q RVP
                  ,          4       hR# )r1   r   r   r2   r   r3   r   r4      quux   012345   abcdefr5   r6      012345abcdef quuxr7   Nr8   r:   s   &  r   testMultiplePackets!EthernetTests.testMultiplePackets;   s    ))+ !1	 )"F	 !1	 )"F	
, 	vr"<aH:AF<<< 	
CbllR	
<r   c                   \         P                  ! 4       p\        R R^ RRRRRR/3.4      p\        R R^ RRRRRR/3.4      pVP                  RV4       VP                  RV4       VP	                  R^ R	7       VP
                  '       d!   Q R
P                  VP
                  4      4       hVP
                  '       d!   Q R
P                  VP
                  4      4       hR# )r1   r   r   r2   r   r3   r   r4   r5   r6   z7Should not expect any more packets, but still want {!r}N)r   r9   r	   r   r$   r   r   r   r   r;   p2s   &   r   testMultipleSameProtos$EthernetTests.testMultipleSameProtos\   s   ))+ !1	 )"F	

  !1	 )"F	

 	vr"vr"<aH 	
GNNLL
	

 	
GNNLL
	
r   c                    \         P                  ! 4       p\        . 4      pVP                  R V4       VP	                  R^ R7       VP	                  R^R7       R# )i  r5   r6   rB   N)r   r9   r	   r   r$   r:   s   &  r   testWrongProtoNotSeen#EthernetTests.testWrongProtoNotSeen   sO    ))+^vr"<aH:AFr   c                <   \         P                  ! 4       p\        R R^ RRRRRR/3RR^RR	RR
RR/3.4      pVP                  RV4       \        RR^RR	RR
RR/3R R^ RRRRRR/3.4      pVP                  RV4       VP	                  R^ R7       VP	                  R^R7       VP	                  R^ R7       VP	                  R^R7       VP
                  '       d   Q RVP
                  ,          4       hVP
                  '       d   Q RVP
                  ,          4       hR# )r1   r   r   r2   r   r3   r   r4   r?   r@   rA   i  r5   r6   s   012345abcdefquuxs   123456987654foobarrB   r7   Nr8   rF   s   &   r   testDemuxingEthernetTests.testDemuxing   sr   ))+ !1	 )"F	 !1	 )"F	
, 	vr" !1	 )"F	 !1	 )"F	
, 	vr"<aH:AF<aH:AF<<< 	
CbllR	
 <<< 	
CbllR	
<r   c                    \         P                  ! 4       p VP                  ^*R4       \        R4      h  \        P
                   d     R# i ; i)z2Adding a wrong level protocol raises an exception.	silliness2addProto must raise an exception for bad protocolsN)r   r9   r   AssertionErrorr   CannotAdaptr   es   & r   testAddingBadProtos_WrongLevel,EthernetTests.testAddingBadProtos_WrongLevel   sL    %%'	WJJr;' !!UVV %% 		s   4 AAc                    \         P                  ! 4       p VP                  R\        . 4      4       \	        R4      h  \
         d   pTP                  R8X  d    Rp?R# h Rp?ii ; i)z=Adding a protocol with a negative number raises an exception.rR   N)z'Added protocol must be positive or zeror   r9   r   r	   rS   	TypeErrorargsrU   s   & r   testAddingBadProtos_TooSmall*EthernetTests.testAddingBadProtos_TooSmall   s[    %%'	WJJr:b>* !!UVV  	vvEE		   = A%A A  A%c                    \         P                  ! 4       p VP                  R\        . 4      4       \	        R4      h  \
         d   pTP                  R8X  d    Rp?R# h Rp?ii ; i)<Adding a protocol with a number >=2**16 raises an exception.rR   Ni   z"Added protocol must fit in 16 bitsr[   rU   s   & r   testAddingBadProtos_TooBig(EthernetTests.testAddingBadProtos_TooBig   s[    %%'	WJJujn- !!UVV  	vv@@		r`   c                    \         P                  ! 4       p VP                  R\        . 4      4       \	        R4      h  \
         d   pTP                  R8X  d    Rp?R# h Rp?ii ; i)rb   rR   Ni  rc   r[   rU   s   & r   testAddingBadProtos_TooBig2)EthernetTests.testAddingBadProtos_TooBig2   s[    %%'	WJJy*R.1 !!UVV  	vv@@		r`   r   N)r&   r'   r(   r)   r<   rC   rH   rK   rN   rW   r^   rd   rg   r*   r+   r,   s   @r   r/   r/   #   s@     
.
B,
\G<
|WWWW Wr   r/   N)zope.interfacer   twisted.pairr   r   twisted.pythonr   twisted.trialr   IRawPacketProtocolr	   TestCaser/   r   r   r   <module>ro      sM    ' & % " S##$
 
 %
0\WH%% \Wr   