
    tfQ                    ,   d dl mZ d dlZd dlmZ d dlmZ d dlmZm	Z	m
Z
mZmZmZmZmZmZmZmZ d dlmZ d dlmZ dZd	Z G d
 dej                  Z G d d          Z G d d          Z G d dej                  Z G d dej                  ZdS )    )annotationsN)Callable)helper)BLINKBOLDG0G1G2G3NORMALREVERSE_VIDEO	UNDERLINEmodesprivateModes)failure)unittestP      c                     e Zd Zd&dZd&dZd&dZd&dZd&dZd&dZd&d	Z	d&d
Z
d&dZd&dZd&dZd&dZd&dZd&dZd&dZd&dZd&dZd&dZd&dZd&dZd&dZd&dZd&dZd&dZd&dZd&dZd&dZd&dZd&dZd&d Z d&d!Z!d&d"Z"d&d#Z#d&d$Z$d%S )'BufferTestsreturnNonec                h    t          j                    | _        | j                                         d S N)r   TerminalBuffertermconnectionMadeselfs    ]/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/conch/test/test_helper.pysetUpzBufferTests.setUp   s,    )++		  """""    c                d   |                      | j        j        t                     |                      | j        j        t
                     |                      | j                                        dt
          dz
  z             |                      | j                                        d           d S )N   
   r   r   )assertEqualr   widthWIDTHheightHEIGHT	__bytes__reportCursorPositionr   s    r    testInitialStatezBufferTests.testInitialState#   s    %000)6222,,..!0DEEE77996BBBBBr"   c                v    |                      t          j        dt          j        di| j        j                   dS )z
        Verify that only DEC Auto Wrap Mode (DECAWM) and DEC Text Cursor Enable
        Mode (DECTCEM) are initially in the Set Mode (SM) state.
        TN)r'   r   	AUTO_WRAPCURSOR_MODEr   r   s    r    test_initialPrivateModesz$BufferTests.test_initialPrivateModes)   s@    
 	#T<+CTJI"	
 	
 	
 	
 	
r"   c                V   | j                             d           | j                             d           |                     | j                                         d           | j                             d           |                     | j                                         d           dS )zQ
        C{""} moves the cursor to the first column in the current row.
              r4   r5      r   r5   N)r   cursorForward
cursorDownr'   r-   insertAtCursorr   s    r    test_carriageReturnzBufferTests.test_carriageReturn3   s     		"""	Q77996BBB	  '''77996BBBBBr"   c                "   | j                             d           |                     | j                                         d           | j                             d           |                     | j                                         d           dS )zV
        C{"
"} moves the cursor to the next row without changing the column.
        r4   )r4   r   r$   r4   r%   N)r   r9   r'   r-   r;   r   s    r    test_linefeedzBufferTests.test_linefeed=   s~     		"""77996BBB	  '''77996BBBBBr"   c                V   | j                             d           | j                             d           |                     | j                                         d           | j                             d           |                     | j                                         d           dS )z:
        C{write} transforms C{"
"} into C{"
"}.
        r4   r5   r6   r$   r      N)r   r9   r:   r'   r-   writer   s    r    test_newlinezBufferTests.test_newlineF   s     		"""	Q77996BBB	77996BBBBBr"   c                   | j         j                                        }| j                             t          j        t          j        g           d|t          j        <   d|t          j        <   |                     || j         j                   dS )z
        Verify that L{helper.TerminalBuffer.setPrivateModes} changes the Set
        Mode (SM) state to "set" for the private modes it is passed.
        TN)r   r   copysetPrivateModesSCROLLSCREENr'   r   expecteds     r    test_setPrivateModesz BufferTests.test_setPrivateModesP   sv    
 9)..00	!!<#68K"LMMM(,$%(,$%49#9:::::r"   c                   | j         j                                        }| j                             t          j        t          j        g           |t          j        = |t          j        = |                     || j         j                   dS )z
        Verify that L{helper.TerminalBuffer.resetPrivateModes} changes the Set
        Mode (SM) state to "reset" for the private modes it is passed.
        N)r   r   rF   resetPrivateModesr0   r1   r'   rJ   s     r    test_resetPrivateModesz"BufferTests.test_resetPrivateModes[   sr    
 9)..00	##\%;\=U$VWWW\+,\-.49#9:::::r"   c                   | j                             d           |                     | j                                         d           | j                                          |                     | j                                         d           | j                             t                     |                     | j                                         dt          dz
  f           d S )Nr5   r8   rA   r   r%   )r   r:   r'   r-   r+   r   s    r    testCursorDownzBufferTests.testCursorDownf   s    	Q77996BBB	77996BBB	V$$$7799Avz?KKKKKr"   c                   | j                             d           |                     | j                                         d           | j                             d           | j                             d           |                     | j                                         d           | j                             d           |                     | j                                         d           d S )Nr4   r&      r%   )r      rT   )r   cursorUpr'   r-   r:   r   s    r    testCursorUpzBufferTests.testCursorUpn   s    	177996BBB	R   	177997CCC	277996BBBBBr"   c                   | j                             d           |                     | j                                         d           | j                             d           |                     | j                                         d           | j                             t                     |                     | j                                         t          df           d S )N   )rX   r   )rB   r   r   )r   r9   r'   r-   r)   r   s    r    testCursorForwardzBufferTests.testCursorForwardy   s    	"""77996BBB	"""77996BBB	&&&7799E1:FFFFFr"   c                r   | j                             d           | j                             d           |                     | j                                         d           | j                             d           |                     | j                                         d           | j                             d           |                     | j                                         d           | j                             d           |                     | j                                         d           d S )N
   rX   )   r      )r%   r   r%   r&   )r   r9   cursorBackwardr'   r-   r   s    r    testCursorBackwardzBufferTests.testCursorBackward   s   	###	  ###77996BBB	  ###77996BBB	  ###77996BBB	  ###77996BBBBBr"   c                    | j                             dd           |                     | j                                         d           d S )Nr5   	   )r5   ra   )r   cursorPositionr'   r-   r   s    r    testCursorPositioningz!BufferTests.testCursorPositioning   sD    	  A&&&77996BBBBBr"   c                    d}| j                             |           |                     | j                                         |dz   dt          dz
  z  z              d S )N   Hello, world.r$   rX   )r   rC   r'   r,   r+   r   ss     r    testSimpleWritingzBufferTests.testSimpleWriting   sW    	,,..E	EVaZ<P0PQQQQQr"   c                   d}| j                             |           | j                             t          |                     | j                             t
          j        g           | j                             d           |                     | j                                         d|dd          z   dz   dt          dz
  z  z              d S )Ns   hello, world.   Hr%   r$   rX   )
r   rC   r^   len
resetModesr   IRMr'   r,   r+   rf   s     r    testOvertypezBufferTests.testOvertype   s    		  Q(((	ei[)))	I!!D1QRR5LE#9EVaZ<P#P	
 	
 	
 	
 	
r"   c                   d}| j                             |           | j                             t          |                     | j                             t
          j        g           | j                             d           |                     | j                                         d|z   dz   dt          dz
  z  z              d S )Ns   ello, world.rj   r$   rX   )
r   rC   r^   rk   setModesr   rm   r'   r,   r+   rf   s     r    
testInsertzBufferTests.testInsert   s    		  Q(((	EI;'''	I!!D1H#5!8L#L	
 	
 	
 	
 	
r"   c                H   d}| j                             d           | j                             d           | j                             |           |                     | j                                         d| j         j        dz  z   |z   dz   dt          dz
  z  z              d S )Nre   r4   s   




r$   r]   )r   r:   r9   rC   r'   r,   fillr+   rf   s     r    testWritingInTheMiddlez"BufferTests.testWritingInTheMiddle   s    	Q	"""	I!!!+,q0585FQJ;OO	
 	
 	
 	
 	
r"   c                Z   d}| j                             t          dz
             | j                             |           |                     | j                                         |d d                             t                    dz   |dd          z   dz   dt          dz
  z  z              d S )Nre   r4   r$   r5   )r   r9   r)   rC   r'   r,   rjustr+   rf   s     r    testWritingWrappedAtEndOfLinez)BufferTests.testWritingWrappedAtEndOfLine   s    		***	I!!bqbEKK&122.6&1*9MM	
 	
 	
 	
 	
r"   c                   | j                                          |                     | j                                         d           | j                             t
                     |                     | j                                         dt
          dz
  f           | j                                          |                     | j                                         dt
          dz
  f           d S )Nr   r%   r   r%   )r   indexr'   r-   r:   r+   r   s    r    	testIndexzBufferTests.testIndex   s    	77996BBB	V$$$7799Avz?KKK	7799Avz?KKKKKr"   c                   | j                                          |                     | j                                         d           | j                             d           |                     | j                                         d           | j                                          |                     | j                                         d           d S )Nr&   rX   r   rX   ry   )r   reverseIndexr'   r-   r:   r   s    r    testReverseIndexzBufferTests.testReverseIndex   s    	   77996BBB	Q77996BBB	   77996BBBBBr"   c                   | j                                          |                     | j                                         d           | j                             d           |                     | j                                         d           | j                                          |                     | j                                         d           dS )zm
        C{nextLine} positions the cursor at the beginning of the row below the
        current row.
        ry   r4   r>   r}   N)r   nextLiner'   r-   r9   r   s    r    test_nextLinezBufferTests.test_nextLine   s    
 		77996BBB	"""77996BBB	77996BBBBBr"   c                H   | j                             d           | j                             d           |                     | j                                         d           | j                                          | j                             d           | j                             d           |                     | j                                         d           | j                                          |                     | j                                         d           d S )Nr4   r]   )r]   r4   r5   )rB      )r   r:   r9   r'   r-   
saveCursorr^   restoreCursorr   s    r    testSaveCursorzBufferTests.testSaveCursor   s    	Q	"""77996BBB		Q	  ###77997CCC	!!!77996BBBBBr"   c                   | j                                          | j                             d           | j                             dd          }|                     |d         d           |                     |d         j        t                     | j                             dd          }|                     |d         d           |                     |d         j        t                     | j                                          | j                             d           | j                             dd          }|                     |d         d           |                     |d         j        t                     | j                             d	d          }|                     |d         d           |                     |d         j        t                     d S )
Ns   Hir   rj   r%      is   !!rX      !r5   )
r   singleShift2rC   getCharacterr'   charsetr
   r   singleShift3r   r   chs     r    testSingleShiftszBufferTests.testSingleShifts   s   	   	Y##Aq))A%%%A+++Y##Aq))A%%%A+++	   	Y##Aq))A%%%A+++Y##Aq))A%%%A+++++r"   c           	     t   d}d}d}| j                             d           | j                                          | j                             d           | j                                          | j                             d           t          }d}|||fD ]}t          t          |                    D ]e}| j                             ||          }|                     |d         |||dz                       |                     |d         j	        |           f|t          k    rt          pt          }|dz  }d S )	Ns   Hellos   Worlds   Bye!s   Hello
s   World
s   Bye!
r   r%   )r   rC   shiftOutshiftInr   rangerk   r   r'   r   r	   )	r   s1s2s3ghrg   ir   s	            r    testShiftingzBufferTests.testShifting   s2   	
###		
###			"""b" 	 	A3q66]] 3 3Y++Aq11  A!a!e)555  A2222RB$"AFAA	 	r"   c                   | j                             t          t          t          t
                     | j                             d           | j                             t                     | j                             d           | j                             t                     | j                             d           | j                             t                     | j                             d           | j                             dd          }| 	                    |d         d           | 
                    |d         j                   | 
                    |d         j                   | 
                    |d         j                   | 
                    |d         j                   | j                             dd          }| 	                    |d         d           |                     |d         j                   |                     |d         j                   |                     |d         j                   |                     |d         j                   | j                             dd          }| 	                    |d         d           | 
                    |d         j                   |                     |d         j                   |                     |d         j                   |                     |d         j                   | j                             dd          }| 	                    |d         d           | 
                    |d         j                   | 
                    |d         j                   |                     |d         j                   |                     |d         j                   d S )	N   W   X   Y   Zr   r%   rX   r5   )r   selectGraphicRenditionr   r   r   r   rC   r   r   r'   
assertTruebold	underlineblinkreverseVideoassertFalser   s     r    testGraphicRenditionz BufferTests.testGraphicRendition  s   	((y%OOO		((000		((///		((...	Y##Aq))A%%%1
###1(((1$$$1*+++Y##Aq))A%%%A$$$A)))A%%%A+,,,Y##Aq))A%%%1$$$A$$$A)))A+,,,Y##Aq))A%%%1$$$1
###A)))A+,,,,,r"   c                   d}d}| j                             t          j        t          j        z   t          j        t          j        z              | j                             |dz              | j                             t                     | j                             |dz              t          t          |                    D ]A}| j                             |d          }|                     |d         |||dz                       |                     |d         j        t                     |                     |d         j                   |                     |d         j                   |                     |d         j                   |                     |d         j                   |                     |d         j        t          j                   |                     |d         j        t          j                   Ct          t          |                    D ]A}| j                             |d          }|                     |d         |||dz                       |                     |d         j        t                     |                     |d         j                   |                     |d         j                   |                     |d         j                   |                     |d         j                   |                     |d         j        t          j                   |                     |d         j        t          j                   Cd S )Ns
   Merry xmass   Just kiddingr$   r   r%   )r   r   r   
FOREGROUNDRED
BACKGROUNDGREENrC   r   r   rk   r   r'   r   r   r   r   r   r   r   
foreground
backgroundWHITEBLACK)r   r   r   r   r   s        r    testColorAttributeszBufferTests.testColorAttributes4  s   	((
*F,=,L	
 	
 	
 		U
###	((000	U
###s2ww 		= 		=A''1--BRUBq1q5yM222RU]B///RUZ(((RU_---RU[)))RU/000RU-vz:::RU-v|<<<<s2ww 		= 		=A''1--BRUBq1q5yM222RU]B///RUZ(((RU_---RU[)))RU/000RU-v|<<<RU-v|<<<<		= 		=r"   c                n   d}d}d}| j                             d                    |||f          dz              | j                             dd           | j                                          |                     | j                                         |dz   dz   |z   dz   dt          dz
  z  z              d S )Ns   line 1s   line 2s   line 3r$   r%   rB   )r   rC   joinrb   	eraseLiner'   r,   r+   r   r   r   r   s       r    testEraseLinezBufferTests.testEraseLineT  s    	

BB<0058999	  A&&&	I!!J#e+evz.BB	
 	
 	
 	
 	
r"   c                0   d}| j                             |           | j                             d           | j                                          |                     | j                                         |d d         dz   dt          dz
  z  z              d S )Nre   r4   r$   rX   )r   rC   r^   eraseToLineEndr'   r,   r+   rf   s     r    testEraseToLineEndzBufferTests.testEraseToLineEnda  s    		  ###	  """,,..#2#&ST*AU0UVVVVVr"   c                p   d}| j                             |           | j                             d           | j                                          |                     | j                                         |dd                              t          |                    dz   dt          dz
  z  z              d S )Nre   r4   r$   rX   )	r   rC   r^   eraseToLineBeginningr'   r,   rv   rk   r+   rf   s     r    testEraseToLineBeginningz$BufferTests.testEraseToLineBeginningh  s    		  ###	&&(((I!!1RSS6<<A#7#7%#?%6TU:BV#V	
 	
 	
 	
 	
r"   c                   | j                             d           | j                             d           | j                                          |                     | j                                         dt
          dz
  z             d S )Ns   Hello world
s   Goodbye world
r$   r%   )r   rC   eraseDisplayr'   r,   r+   r   s    r    testEraseDisplayzBufferTests.testEraseDisplayq  ss    	()))	*+++	   ,,..!0DEEEEEr"   c                n   d}d}| j                             d                    ||df                     | j                             dd           | j                                          |                     | j                                         |dz   |d d         z   dz   dt          dz
  z  z              d S )N   Hello world   Goodbye worldr$   r"   r4   r%   r5   )r   rC   r   rb   eraseToDisplayEndr'   r,   r+   r   r   r   s      r    testEraseToDisplayEndz!BufferTests.testEraseToDisplayEndx  s    	

BC=11222	  A&&&	##%%%I!!2:2A2#6#>&ST*AU#U	
 	
 	
 	
 	
r"   c           	        d}d}| j                             d                    ||f                     | j                             dd           | j                                          |                     | j                                         d|dd                              t          |                    z   dz   dt          dz
  z  z              d S )Nr   r   r$   r4   r%      r5   )
r   rC   r   rb   eraseToDisplayBeginningr'   r,   rv   rk   r+   r   s      r    testEraseToDisplayBeginningz'BufferTests.testEraseToDisplayBeginning  s    	

B8,,---	  A&&&	))+++I!!BqrrFLLR)))E1EVaZ4HH	
 	
 	
 	
 	
r"   c                b   d}d}| j                             d                    ||f                     | j                             dd           | j                                          |                     | j                                         |dz   dz   |z   dz   dt          dz
  z  z              d S )Nr   r   r$   r]   r%   rB   )r   rC   r   rb   
insertLiner'   r,   r+   r   s      r    testLineInsertionzBufferTests.testLineInsertion  s    	

B8,,---	  A&&&	I!!J#e+evz.BB	
 	
 	
 	
 	
r"   c                b   d}d}d}| j                             d                    |||f                     | j                             dd           | j                                          |                     | j                                         |dz   |z   dz   dt          dz
  z  z              d S )Nr   s   Middle wordsr   r$   ra   r%   r5   )r   rC   r   rb   
deleteLiner'   r,   r+   r   s       r    testLineDeletionzBufferTests.testLineDeletion  s    	

BB<00111	  A&&&	I!!2:?U#:Ufqj=Q#Q	
 	
 	
 	
 	
r"   Nr   r   )%__name__
__module____qualname__r!   r.   r2   r<   r?   rD   rL   rO   rQ   rV   rY   r_   rc   rh   rn   rq   rt   rw   r{   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r"   r    r   r      s       # # # #C C C C
 
 
 
C C C CC C C CC C C C	; 	; 	; 	;	; 	; 	; 	;L L L L	C 	C 	C 	CG G G G	C 	C 	C 	CC C C CR R R R

 
 
 

 
 
 

 
 
 

 
 
 
L L L LC C C C
C 
C 
C 
C	C 	C 	C 	C, , , ,.   ($- $- $- $-L= = = =@
 
 
 
W W W W
 
 
 
F F F F	
 	
 	
 	


 

 

 



 

 

 



 

 

 

 

 

r"   r   c                  6    e Zd ZdZdZddZddZddZddZdS )FakeDelayedCallFfsFakeSchedulertimeoutfloatfCallable[..., None]atuple[object, ...]kwdict[str, object]r   r   c                L    || _         || _        || _        || _        || _        d S r   )r   r   r   r   r   )r   r   r   r   r   r   s         r    __init__zFakeDelayedCall.__init__  s+     r"   boolc                     | j         p| j         S r   )	cancelledcalledr   s    r    activezFakeDelayedCall.active  s    N1dk22r"   c                    d| _         d S NT)r   r   s    r    cancelzFakeDelayedCall.cancel  s    r"   c                B    d| _          | j        | j        i | j         d S r   )r   r   r   r   r   s    r    callzFakeDelayedCall.call  s*    "$'"""""r"   N)r   r   r   r   r   r   r   r   r   r   r   r   )r   r   r   )	r   r   r   r   r   r   r   r   r   r   r"   r    r   r     sn        FI   3 3 3 3   
# # # # # #r"   r   c                      e Zd ZddZddZdS )r   r   r   c                    g | _         d S r   )callsr   s    r    r   zFakeScheduler.__init__  s    ,.


r"   r   r   r   r   r   objectr   r   c           	     r    | j                             t          | ||||                     | j         d         S )N)r   appendr   )r   r   r   r   r   s        r    	callLaterzFakeScheduler.callLater  s6     	
/$ArBBCCCz"~r"   Nr   )
r   r   r   r   r   r   r   r   r   r   )r   r   r   r   r   r   r"   r    r   r     s<        / / / /     r"   r   c                  V    e Zd ZddZddZddZddZddZddZddZ	ddZ
ddZdS )ExpectTestsr   r   c                    t          j                    | _        | j                                         t	                      | _        d S r   )r   ExpectableBufferr   r   r   r   r   s    r    r!   zExpectTests.setUp  s5    +--		  """//r"   c                b   g }| j                             dd| j                  }|                    |j                   | j                             d           |                     |           | j                             d           |                     |           |                     |d         	                                d           |                     t          | j        j                  d           |                     | j        j        d                                                    d S )N   hello worldr%   r   	schedulers   greeting puny earthlings
s   hello world
r   )r   expectr   addCallbackr   rC   r   r   r'   grouprk   r   r   r   resultds      r    testSimpleStringzExpectTests.testSimpleString  s    (*I^Q$'JJ	fm$$$	5666   	()))**N;;;TW]++Q///q)002233333r"   c                   g }| j                             d          }|                    |j                   |                     |           | j                             d           |                     |           | j                             d           |                     |           | j                             d           |                     |           |                     |d                                         d           d S )Nr      hello s   worl   dr   )	r   r  r  r   r   rC   r   r'   r  r  s      r    testBrokenUpStringzExpectTests.testBrokenUpString  s    (*I^,,	fm$$$   		"""   	      	**N;;;;;r"   c                   g }| j                             d          }|                    |j                   | j                             d          }|                    |j                   |                     |           | j                             d           |                     |           | j                             d           |                     t          |          d           | j                             d           |                     t          |          d           |                     |d                                         d           |                     |d                                         d           d S )Nr	     worlds   hello    r%   rX   r   )	r   r  r  r   r   rC   r'   rk   r  r   r  d1d2s       r    testMultiplezExpectTests.testMultiple  sC   (*Yi((
v}%%%Yh''
v}%%%   	!!!   	Va(((	!!!Va(((**I666**H55555r"   c                ,   | j                             d           g }| j                             d          }|                    |j                   |                     |           |                     |d                                         d           d S )Nr   r   )r   rC   r  r  r   r   r'   r  r  s      r    testSynchronouszExpectTests.testSynchronous  s    	'''(*I^,,	fm$$$**N;;;;;r"   c                   | j                             d           g }| j                             d          }|                    |j                   | j                             d          }|                    |j                   |                     t          |          d           |                     |d                                         d           |                     |d                                         d           d S )Ns   goodbye worlds   byer  rX   r   r%   )r   rC   r  r  r   r'   rk   r  r  s       r    testMultipleSynchronousz#ExpectTests.testMultipleSynchronous  s    	()))(*Yf%%
v}%%%Yh''
v}%%%Va(((**F333**H55555r"   resfailure.Failurec                    |                      t          |d                     |                     |j        t          j                   d S )Ntype)r   hasattrr'   r  r   ExpectationTimeout)r   r  s     r    _cbTestTimeoutFailurez!ExpectTests._cbTestTimeoutFailure  s?    V,,---6#<=====r"   c                    | j                             dd| j                  }|                    | j                   | j        j        d                                          d S )Nr   r%   r   r   )r   r  r   addBothr  r   r   )r   r  s     r    testTimeoutFailurezExpectTests.testTimeoutFailure  sV    I^Q$'JJ			$,---ar"   c                   | j                             d           g }| j                             dd| j                  }|                    | j                   | j                             d          }|                    |j                   | j        j        d         	                                 | 
                    t          |          d           | 
                    |d                                         d           d S )Ns   not zoomtasticr   r%   r   s   zoomr   )r   rC   r  r   r  r  r  r   r   r   r'   rk   r  r  s       r    testOverlappingTimeoutz"ExpectTests.testOverlappingTimeout#  s    	)***(*Yna47KK


4-...Yg&&
v}%%%aVa(((**G44444r"   Nr   )r  r  r   r   )r   r   r   r!   r  r  r  r  r  r  r   r"  r   r"   r    r   r     s        " " " "
4 4 4 4< < < <6 6 6 6"< < < <6 6 6 6> > > >       
5 5 5 5 5 5r"   r   c                  "    e Zd ZdZddZddZdS )CharacterAttributeTestszG
    Tests for L{twisted.conch.insults.helper.CharacterAttribute}.
    r   r   c           
        |                      t          j                    t          j                               |                      t          j                    t          j        t                               |                      t          j        ddddt          j                  t          j        ddddt          j                             |                     t          j                    t          j        t                               |                     t          j        d          t          j        d                     dS )z
        L{CharacterAttribute}s must have matching character attribute values
        (bold, blink, underline, etc) with the same values to be considered
        equal.
        )r   TF)r   r   r   r   r   r   N)r'   r   CharacterAttributer   BLUEassertNotEqualr	   r   s    r    test_equalityz%CharacterAttributeTests.test_equality7  sD    	244f6O6Q6QRRR%'')B2)N)N)N	
 	
 	
 	%!!;   %!!;  	
 	
 	
" 	%'')B2)N)N)N	
 	
 	
 	%4000&2KQV2W2W2W	
 	
 	
 	
 	
r"   c                l   t          j                                        d           |                     | j        g          }|                     t          |          d           |                     |d         d         t                     d}|                     |d         d         d|z             d	S )
z~
        L{twisted.conch.insults.helper.CharacterAttribute.wantOne} emits
        a deprecation warning when invoked.
        Tr&  r%   r   categoryz5twisted.conch.insults.helper._FormattingState.wantOnemessagez#%s was deprecated in Twisted 13.1.0N)r   _FormattingStatewantOneflushWarningstest_wantOneDeprecatedr'   rk   DeprecationWarning)r   warningsShowndeprecatedClasss      r    r1  z.CharacterAttributeTests.test_wantOneDeprecated\  s     	!!))t)444**D,G+HII]++Q///q)*57IJJJQ!Y'1_E	
 	
 	
 	
 	
r"   Nr   )r   r   r   __doc__r*  r1  r   r"   r    r$  r$  2  sG         #
 #
 #
 #
J
 
 
 
 
 
r"   r$  )
__future__r   retypingr   twisted.conch.insultsr   twisted.conch.insults.insultsr   r   r   r	   r
   r   r   r   r   r   r   twisted.pythonr   twisted.trialr   r)   r+   TestCaser   r   r   r   r$  r   r"   r    <module>r>     s   # " " " " " 				       ( ( ( ( ( (                          # " " " " " " " " " " "
	G
 G
 G
 G
 G
(# G
 G
 G
T# # # # # # # #>       ]5 ]5 ]5 ]5 ]5(# ]5 ]5 ]5@9
 9
 9
 9
 9
h/ 9
 9
 9
 9
 9
r"   