
    bU                     Z   d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZ d dlmZ d dlm	Z
 d dlmZ  ej                  dd	      dBd
       ZdBdZ ej                  dd	e      dBd       Z ej                  dd	d      dCd       Z ej$                  ddd      dDd       ZdDdZ G d de      Z G d de      Z G d de      Z G d de      Z ej4                         dEd       ZdEdZ ej4                  e      dEd        Z ej4                         d!        Z ej4                  e      d"        Zd# Z  ejB                  e d$e"      Z# ej4                          G d% d&e             Z$ ej4                  e       G d' d(e             Z% ejL                  d)       G d* d)e             Z' G d+ d,e'      Z( G d- d.e      Z) ejT                  ed/e"      Z+ ejT                  ed/e"e      Z, G d0 d1e
jZ                        Z. G d2 d3e
jZ                        Z/ G d4 d5e
jZ                        Z0 G d6 d7e
jZ                        Z1 G d8 d9e
jZ                        Z2 G d: d;e
jZ                        Z3 G d< d=e
jZ                        Z4 G d> d?e
jZ                        Z5 G d@ dAe
jZ                        Z6y)F    N)disable)moves)removals)renames)base)updatingblipblopc                 
    | |fS N r	   r
   s     F/usr/lib/python3/dist-packages/debtcollector/tests/test_deprecation.py	blip_blopr          $<    c                 
    | |fS r   r   r   s     r   blip_blop_unwrappedr       s    $<r   categoryc                 
    | |fS r   r   r   s     r   blip_blop_2r   $   r   r   T)replacec                     | S r   r   r
   s    r   blip_blop_3r   )   s    Kr   typecatfelinec                     d| z  S NzThe %s meowed quietlyr   r   s    r   blip_blop_blipr#   .   s    "T))r   c                     d| z  S r!   r   r"   s    r   blip_blop_blip_unwrappedr%   3   s    "T))r   c                       e Zd Zed        Ze ej                  d      d               Ze ej                  de      d               Z	 e
j                  dd      edd
              Zy	)WoofWoofc                      yNwoofr   selfs    r   barkzWoofWoof.bark8   s    r   r-   c                     | j                   S r   r-   r+   s    r   burkzWoofWoof.burk<        yyr   r   c                     | j                   S r   r/   r+   s    r   berkzWoofWoof.berkA   r1   r   respzPlease use 'response' insteadmessageNc                      y)Nzsuper-duperr   )clsr4   responses      r   factoryzWoofWoof.factoryF   s     r   )NN)__name__
__module____qualname__propertyr-   r   moved_propertyr0   PendingDeprecationWarningr3   r   removed_kwargclassmethodr:   r   r   r   r'   r'   7   s      U&! "  U&+DE F  XF,KL  Mr   r'   c                   |    e Zd Z ej                  d      dd       Z ej                  de      dd       ZddZy)KittyKat	supermeowc                 $    | j                  |      S r   rE   r,   volumes     r   meowzKittyKat.meowN       ~~f%%r   r   c                 $    | j                  |      S r   rG   rH   s     r   maowzKittyKat.maowR   rK   r   c                      yNrE   r   rH   s     r   rE   zKittyKat.supermeowV   s    r   N)   )	r;   r<   r=   r   moved_methodrJ   r@   rM   rE   r   r   r   rD   rD   L   sK    U$& %& U.GH& I&r   rD   c                   l    e Zd ZdZ ej
                  dd      Zed        Z ej
                  dd      Z	y)Giraffeorangecolourcolorc                      yN   r   r+   s    r   heightzGiraffe.height^   s    r   heighttrZ   N)
r;   r<   r=   rV   r   moved_read_only_propertyrU   r>   rZ   r[   r   r   r   rS   rS   Z   sC    E+U++Hg>F  -e,,YAGr   rS   c                       e Zd Zd Zy)
NewHotnessc                      yNcoldr   r+   s    r   hotzNewHotness.hotf   s    r   N)r;   r<   r=   rb   r   r   r   r^   r^   e   s    r   r^   c                     | S r   r   
fake_inputs    r   crimson_lightningrf   j       r   c                     | S r   r   rd   s    r   crimson_lightning_unwrappedri   o   s    r   c                     | S r   r   rd   s    r   crimson_lightning_to_removerk   s   rg   r   c                       yNTr   r   r   r   	red_cometrn   x       r   c                       yrm   r   r   r   r   
blue_cometrq   }   ro   r   c                       y)Yellow.Tr   r   r   r   
yellow_sunrt      ro   r   yellowish_sunc                       e Zd Zy)EFSFNr;   r<   r=   r   r   r   rw   rw          r   rw   c                       e Zd Zy)EFSF_2Nrx   r   r   r   r{   r{      ry   r   r{   StarLordc                       e Zd Zd Zy)r|   c                     d| _         y )Nstar)namer+   s    r   __init__zStarLord.__init__   s	    	r   N)r;   r<   r=   r   r   r   r   r|   r|      s    r   c                        e Zd Z fdZ xZS )
StarLordJrc                 8    t         t        |           || _        y r   )superr   r   r   )r,   r   	__class__s     r   r   zStarLordJr.__init__   s    j$(*	r   )r;   r<   r=   r   __classcell__)r   s   @r   r   r      s     r   r   c                      e Zd Z ej                         d        Zej                  d        Zej                  d        Zej                  d        Z ej                  d      d        Z
 ej                  e      d	        Z ej                         ed
               Z ej                  e      ed               Z ej                         ed               Z ej                  e      ed               Zy)ThingBc                      y r   r   r+   s    r   black_tristarszThingB.black_tristars       r   c                      y)Ngreenr   r+   s    r   green_tristarszThingB.green_tristars   s    r   c                      y r   r   )r,   values     r   r   zThingB.green_tristars   r   r   c                      y r   r   r+   s    r   r   zThingB.green_tristars   r   r   stop using mer5   c                      y)N
green-bluer   r+   s    r   green_blue_tristarszThingB.green_blue_tristars   s    r   r   c                      y r   r   r+   s    r   blue_tristarszThingB.blue_tristars   r   r   c                      y r   r   r8   s    r   
white_wolfzThingB.white_wolf        	r   c                      y r   r   r   s    r   yellow_wolfzThingB.yellow_wolf   r   r   c                       y r   r   r   r   r   
blue_giantzThingB.blue_giant   r   r   c                       y r   r   r   r   r   green_giantzThingB.green_giant   r   r   N)r;   r<   r=   r   remover   removed_propertyr   setterdeleterr   r@   r   rB   r   r   staticmethodr   r   r   r   r   r   r      sF   X__        X7 8 X__78 9 X__   X__78  9 X__   X__78  9r   r   
OldHotnessc                       e Zd Zd Zy)DeprecateAnythingTestc                    t        j                  d      5 }t        j                  d       t        j                  d       t        j                  d       d d d        | j                  dt                     y # 1 sw Y   %xY w)NTrecordalwaysz
Its brokenzIts really brokenrY   )warningscatch_warningssimplefilterdebtcollector	deprecateassertEquallenr,   captures     r   test_generationz%DeprecateAnythingTest.test_generation   sh    $$D1 	9W!!(+##L1##$78	9 	CL)		9 	9s   A A;;BN)r;   r<   r=   r   r   r   r   r   r      s    *r   r   c                   *    e Zd Zd Zd Zd Zd Zd Zy)MovedInheritableClassTestc                 X    | j                  t        t        j                  dt               y )Nb)assertRaises	TypeErrorr   moved_classr;   r+   s    r   test_broken_type_classz0MovedInheritableClassTest.test_broken_type_class   s    )U%6%6XFr   c                     t               }| j                  |t               | j                  d|j	                                y r`   )r   assertIsInstancer^   r   rb   )r,   olds     r   test_basicsz%MovedInheritableClassTest.test_basics   s/    lc:.+r   c                    t        j                  d      5 }t        j                  d       t                d d d        | j	                  dt                     |d   }| j	                  t        |j                         y # 1 sw Y   JxY wNTr   r      r   )r   r   r   r   r   r   DeprecationWarningr   r,   r   ws      r   test_warnings_emitted_creationz8MovedInheritableClassTest.test_warnings_emitted_creation   sn    $$D1 	W!!(+L	 	CL)AJ+QZZ8	 	    B  B	c                    t        j                  d      5 }t        j                  d       t                d d d        | j	                  dt                     |d   }| j	                  t        |j                         y # 1 sw Y   JxY wr   )r   r   r   OldHotness2r   r   r@   r   r   s      r   &test_warnings_emitted_creation_pendingz@MovedInheritableClassTest.test_warnings_emitted_creation_pending   sn    $$D1 	W!!(+M	 	CL)AJ2AJJ?	 	r   c                 0    G d dt               }t        j                  d      5 }t        j                  d        |        d d d        | j	                  dt                     |d   }| j	                  t        |j                         y # 1 sw Y   JxY w)Nc                       e Zd Zy)JMovedInheritableClassTest.test_existing_refer_subclass.<locals>.MyOldThingNrx   r   r   r   
MyOldThingr      s    r   r   Tr   r   r   r   )r   r   r   r   r   r   r   r   )r,   r   r   r   s       r   test_existing_refer_subclassz6MovedInheritableClassTest.test_existing_refer_subclass   s|    	 	 $$D1 	W!!(+L	 	CL)AJ+QZZ8	 	s   BBN)r;   r<   r=   r   r   r   r   r   r   r   r   r   r      s    G,
9@9r   r   c                   *    e Zd Zd Zd Zd Zd Zd Zy)MovedPropertyTestc                     t               }| j                  d|j                         | j                  d|j                         y r)   )r'   r   r0   r-   )r,   dogs     r   r   zMovedPropertyTest.test_basics  s1    j**r   c                 F   t        j                  d      5 }t        j                  d       | j                  dt        j
                         t	               }| j                  d|j                         d d d        | j                  dt                     y # 1 sw Y   %xY w)NTr   r   rT   rY   )r   r   r   r   rS   rU   r[   r   )r,   r   gs      r   test_readonly_movez$MovedPropertyTest.test_readonly_move
  sz    $$D1 	+W!!(+Xw~~6	AQ		*		+
 	CL)	+ 	+s   ABB c                 P   t               }t        j                  d      5 }t        j                  d       | j	                  d|j
                         d d d        | j	                  dt                     |d   }| j	                  t        |j                         y # 1 sw Y   JxY wNTr   r   r*   r   r   )	r'   r   r   r   r   r0   r   r   r   r,   r   r   r   s       r   test_warnings_emittedz'MovedPropertyTest.test_warnings_emitted  s    j$$D1 	/W!!(+VSXX.	/ 	CL)AJ+QZZ8	/ 	/   2BB%c                 P   t               }t        j                  d      5 }t        j                  d       | j	                  d|j
                         d d d        | j	                  dt                     |d   }| j	                  t        |j                         y # 1 sw Y   JxY wr   )	r'   r   r   r   r   r3   r   r@   r   r   s       r   test_warnings_emitted_pendingz/MovedPropertyTest.test_warnings_emitted_pending  s    j$$D1 	/W!!(+VSXX.	/ 	CL)AJ2AJJ?	/ 	/r   c                    t               }t        j                  d      5 }t        j                  d       | j	                  d|j
                         d d d        | j	                  dt                     y # 1 sw Y   %xY w)NTr   r   r*   r   )r'   r   r   r   r   r-   r   )r,   r   r   s      r   test_warnings_not_emittedz+MovedPropertyTest.test_warnings_not_emitted$  sf    j$$D1 	/W!!(+VSXX.	/ 	CL)	/ 	/s   2A77B N)r;   r<   r=   r   r   r   r   r   r   r   r   r   r     s    +
*9@*r   r   c                       e Zd Zd Zy)DisabledTestc                    t               }t               }t        j                  d      5 }t        j                  d       t        j                         5  | j                  t                      | j                  d|j                         | j                  d|j                                d d d        d d d        | j                  dt                     y # 1 sw Y   -xY w# 1 sw Y   1xY w)NTr   r   r*   rE   r   )r'   rD   r   r   r   r   DisableFixture
assertTrueru   r   r3   rJ   r   )r,   r   cr   s       r   r   zDisabledTest.test_basics-  s    jJ$$D1 	8W!!(+'') 80  2  affh78	8 	CL)	8 8	8 	8s$   *C#AC+C#C 	C##C,N)r;   r<   r=   r   r   r   r   r   r   ,  s    	*r   r   c                       e Zd Zd Zd Zy)MovedFunctionTestc                     | j                  t                      | j                  t                      | j                  dt        j                         y )Nrs   )r   ru   rt   r   __doc__r+   s    r   r   zMovedFunctionTest.test_basics:  s4    (
%M$9$9:r   c                 6   t        j                  d      5 }t        j                  d       | j                  t	                      d d d        | j                  dt                     |d   }| j                  t        |j                         y # 1 sw Y   JxY wr   )	r   r   r   r   ru   r   r   r   r   r   s      r   r   z'MovedFunctionTest.test_warnings_emitted?  sw    $$D1 	-W!!(+OOMO,	- 	CL)AJ+QZZ8	- 	-   /BBN)r;   r<   r=   r   r   r   r   r   r   r   9  s    ;
9r   r   c                   *    e Zd Zd Zd Zd Zd Zd Zy)MovedMethodTestc                     t               }| j                  d|j                                | j                  d|j                                y rO   )rD   r   rJ   rE   )r,   r   s     r   r   zMovedMethodTest.test_basicsI  s5    Jaffh/akkm4r   c                 X   t               }t        j                  d      5 }t        j                  d       | j	                  d|j                                d d d        | j	                  dt                     |d   }| j	                  t        |j                         y # 1 sw Y   JxY wNTr   r   rE   r   r   )	rD   r   r   r   r   rJ   r   r   r   r,   r   r   r   s       r   r   z%MovedMethodTest.test_warnings_emittedN  s    J$$D1 	4W!!(+[!&&(3	4 	CL)AJ+QZZ8	4 	4   6B  B)c                 X   t               }t        j                  d      5 }t        j                  d       | j	                  d|j                                d d d        | j	                  dt                     |d   }| j	                  t        |j                         y # 1 sw Y   JxY wr   )	rD   r   r   r   r   rM   r   r@   r   r   s       r   r   z-MovedMethodTest.test_warnings_emitted_pendingW  s    J$$D1 	4W!!(+[!&&(3	4 	CL)AJ2AJJ?	4 	4r   c                    t               }t        j                  d      5 }t        j                  d       | j	                  d|j                                d d d        | j	                  dt                     y # 1 sw Y   %xY w)NTr   r   rE   r   )rD   r   r   r   r   rE   r   )r,   r   r   s      r   r   z)MovedMethodTest.test_warnings_not_emitted`  sh    J$$D1 	9W!!(+[!++-8	9 	CL)	9 	9s   6A;;Bc                     | j                  t        j                  t        j                        t        j                  t        j
                               y r   )r   inspectgetfullargspecrD   rE   rJ   r+   s    r   test_keeps_argspecz"MovedMethodTest.test_keeps_argspecg  s6    //0B0BC //>	@r   N)r;   r<   r=   r   r   r   r   r   r   r   r   r   r   H  s    5
9@*@r   r   c                   0    e Zd Zd Zd Zd Zd Zd Zd Zy)RenamedKwargTestc                 R   | j                  dt                      | j                  dt        d             | j                  dt        d             | j                  dt        dd             | j                  dt        d             | j                  dt        d             y )	Nr   r   rY   r   rY   r	   r   rY   r   )rY   rY   r   )r   r   r   r+   s    r   r   zRenamedKwargTest.test_basicsm  s    -!23!23!:;KQ/0KQ/0r   c                 t   t        j                  d      5 }t        j                  d       | j                  dt	        d             d d d        | j                  dt                     |d   }| j                  t        |j                         t        j                  d      5 }t        j                  d       | j                  dt        d             d d d        | j                  dt        |             |d   }| j                  t        |j                         y # 1 sw Y   xY w# 1 sw Y   VxY w	NTr   r   r  rY   r  r   r   )	r   r   r   r   r   r   r   r   r   r   s      r   r   z&RenamedKwargTest.test_warnings_emittedu  s    $$D1 	8W!!(+VYA%67	8 	CL)AJ+QZZ8$$D1 	5W!!(+Q 34	5 	CL)AJ+QZZ8	8 	8	5 	5s   2D"'2D."D+.D7c                    t        j                  d      5 }t        j                  d       t        j	                  d       d d d        | j                  dt                     |d   }| j                  t        |j                         t        j                  d      5 }t        j                  d       t        j	                  d       d d d        | j                  dt        |             y # 1 sw Y   xY w# 1 sw Y   1xY w)	NTr   r   hi)r4   r   r   )r9   )	r   r   r   r'   r:   r   r   r   r   r   s      r   !test_warnings_emitted_classmethodz2RenamedKwargTest.test_warnings_emitted_classmethod  s    $$D1 	(W!!(+$'	( 	CL)AJ+QZZ8$$D1 	,W!!(+d+	, 	CL)	( 	(	, 	,s   ,C1!,C=1C:=Dc                 <   t        j                  d      5 }t        j                  d       | j                  dt	        d             d d d        | j                  dt                     |d   }| j                  t        |j                         y # 1 sw Y   JxY wr  )r   r   r   r   r   r   r@   r   r   s      r   r   z.RenamedKwargTest.test_warnings_emitted_pending  s~    $$D1 	:W!!(+V[a%89	: 	CL)AJ2AJJ?	: 	:s   2BBc                    t        j                  d      5 }t        j                  d       | j                  dt	        d             d d d        | j                  dt                     t        j                  d      5 }t        j                  d       | j                  dt        d             d d d        | j                  dt        |             y # 1 sw Y   xY w# 1 sw Y   1xY w)NTr   r   r  rY   r   r   )r   r   r   r   r   r   r   r   s     r   r   z*RenamedKwargTest.test_warnings_not_emitted  s    $$D1 	8W!!(+VYA%67	8 	CL)$$D1 	5W!!(+Q 34	5 	CL)	8 	8	5 	5s   2C2C$C!$C-c                     | j                  t        j                  t              t        j                  t                     y r   )r   r   r   r   r   r+   s    r   test_argspeczRenamedKwargTest.test_argspec  s,    //0CD //	:	<r   N)	r;   r<   r=   r   r   r	  r   r   r  r   r   r   r   r   l  s!    19
*@*<r   r   c                       e Zd Zd Zd Zd Zy)UpdatedArgsTestc                 8   t        j                  d      5 }t        j                  d       | j                  dt	                      d d d        | j                  dt                     |d   }| j                  t        |j                         y # 1 sw Y   JxY w)NTr   r   zThe cat meowed quietlyr   r   )r   r   r   r   r#   r   FutureWarningr   r   s      r   
test_basiczUpdatedArgsTest.test_basic  s    $$D1 	IW!!(+5~7GH	I 	CL)AJ

3	I 	Is   0BBc                     t        j                  d      5 }t        j                  d       | j                  dt	        d             d d d        | j                  dt                     y # 1 sw Y   %xY w)NTr   r   zThe kitten meowed quietlykittenr"   r   )r   r   r   r   r#   r   r   s     r   test_kwarg_setzUpdatedArgsTest.test_kwarg_set  sd    $$D1 	/W!!(++H-/	/
 	CL)	/ 	/s   2A--A6c                     | j                  t        j                  t              t        j                  t                     y r   )r   r   r   r%   r#   r+   s    r   test_argspec_preservedz&UpdatedArgsTest.test_argspec_preserved  s-    //0HI //?	Ar   N)r;   r<   r=   r  r  r  r   r   r   r  r    s    4*Ar   r  c                       e Zd Zd Zd Zd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zy)RemovalTestsc                 :    | j                  dt        d             y )N  )r   rf   r+   s    r   test_function_argszRemovalTests.test_function_args  s    /45r   c                 6    | j                  t                      y r   )r   rn   r+   s    r   test_function_noargsz!RemovalTests.test_function_noargs  s    	$r   c                     | j                  t        j                  t              t        j                  t                     y r   )r   r   r   ri   rf   r+   s    r   test_function_keeps_argspecz(RemovalTests.test_function_keeps_argspec  s.    ""#>?""#45	7r   c                 R   t        j                  d      dd       }t        j                  d      5 }t        j                  d       | j                  d |d             d d d        | j                  d	t                     |d
   }| j                  t        |j                         t        j                  d      5 }t        j                  d       | j                  d |              d d d        | j                  d
t        |             y # 1 sw Y   xY w# 1 sw Y   1xY w)Nr   rY   c                     | S r   r   r   s    r   fz-RemovalTests.test_deprecated_kwarg.<locals>.f      Hr   Tr   r      r#  r   r   rY   )	r   rA   r   r   r   r   r   r   r   r,   r$  r   r   s       r   test_deprecated_kwargz"RemovalTests.test_deprecated_kwarg  s    				$	 
%	 $$D1 	(W!!(+QA'	( 	CL)AJ+QZZ8$$D1 	%W!!(+Q$	% 	CL)	( 	(	% 	%s   /D -DDD&c                     t        j                  d      dd       }dd}| j                  t        j                  |      t        j                  |             y )Nr   c                     | S r   r   r#  s    r   r$  z8RemovalTests.test_removed_kwarg_keeps_argspec.<locals>.f  r%  r   c                     | S r   r   r#  s    r   f_unwrappedzBRemovalTests.test_removed_kwarg_keeps_argspec.<locals>.f_unwrapped  s    Hr   r'  )r   rA   r   r   r   )r,   r$  r-  s      r    test_removed_kwarg_keeps_argspecz-RemovalTests.test_removed_kwarg_keeps_argspec  sO    				$	 
%		 	//< //2	4r   c                 ^   t        j                  dt              dd       }t        j                  d      5 }t        j
                  d       | j                  d |d	             d d d        | j                  d
t                     |d   }| j                  t        |j                         t        j                  d      5 }t        j
                  d       | j                  d |              d d d        | j                  dt        |             y # 1 sw Y   xY w# 1 sw Y   1xY w)Nr   r   rY   c                     | S r   r   r#  s    r   r$  z5RemovalTests.test_pending_deprecated_kwarg.<locals>.f  r%  r   Tr   r   r&  r#  r   r   r'  )	r   rA   r@   r   r   r   r   r   r   r(  s       r   test_pending_deprecated_kwargz*RemovalTests.test_pending_deprecated_kwarg  s    			.G	H	 
I	 $$D1 	(W!!(+QA'	( 	CL)AJ2AJJ?$$D1 	%W!!(+Q$	% 	CL)	( 	(	% 	%s   /D-D#D #D,c                 b   t        j                  d      5 }t        j                  d       t               }| j	                  d|j
                         d|_        |`d d d        | j	                  dt                     |d   }| j	                  t        |j                         y # 1 sw Y   JxY w)NTr   r   r   r   r&  r   )	r   r   r   r   r   r   r   r   r   r,   r   or   s       r   test_warnings_emitted_propertyz+RemovalTests.test_warnings_emitted_property  s    $$D1 	!W!!(+AWa&6&67"A 	! 	CL)AJ+QZZ8	! 	!s   AB%%B.c                    t        j                  d      5 }t        j                  d       t               }| j	                  d|j
                         d d d        | j	                  dt                     |d   }| j                  dt        |j                               | j	                  t        |j                         y # 1 sw Y   oxY w)NTr   r   r   r   r   r   )r   r   r   r   r   r   r   assertInstrr6   r   r   r3  s       r   -test_warnings_emitted_property_custom_messagez:RemovalTests.test_warnings_emitted_property_custom_message  s    $$D1 	BW!!(+A\1+@+@A	B 	CL)AJos199~6+QZZ8	B 	Bs   <CC
c                 :   t        j                  d      5 }t        j                  d       | j                  dt	        d             d d d        | j                  dt                     |d   }| j                  t        |j                         y # 1 sw Y   JxY wNTr   r   r  r   r   )r   r   r   r   rf   r   r   r   r   s      r   #test_warnings_emitted_function_argsz0RemovalTests.test_warnings_emitted_function_args  s    $$D1 	:W!!(+S"3C"89	: 	CL)AJ+QZZ8	: 	:   1BBc                 :   t        j                  d      5 }t        j                  d       | j                  dt	        d             d d d        | j                  dt                     |d   }| j                  t        |j                         y # 1 sw Y   JxY wr;  )r   r   r   r   rk   r   r@   r   r   s      r   +test_pending_warnings_emitted_function_argsz8RemovalTests.test_pending_warnings_emitted_function_args  s    $$D1 	DW!!(+S"=c"BC	D 	CL)AJ2AJJ?	D 	Dr=  c                 6   t        j                  d      5 }t        j                  d       | j                  t	                      d d d        | j                  dt                     |d   }| j                  t        |j                         y # 1 sw Y   JxY wr   )	r   r   r   r   rn   r   r   r   r   r   s      r   %test_warnings_emitted_function_noargsz2RemovalTests.test_warnings_emitted_function_noargs  sw    $$D1 	)W!!(+OOIK(	) 	CL)AJ+QZZ8	) 	)r   c                 6   t        j                  d      5 }t        j                  d       | j                  t	                      d d d        | j                  dt                     |d   }| j                  t        |j                         y # 1 sw Y   JxY wr   )	r   r   r   r   rq   r   r   r@   r   r   s      r   -test_pending_warnings_emitted_function_noargsz:RemovalTests.test_pending_warnings_emitted_function_noargs&  sw    $$D1 	*W!!(+OOJL)	* 	CL)AJ2AJJ?	* 	*r   c                    t        j                  d      5 }t        j                  d       t                d d d        | j	                  dt                     |d   }| j	                  t        |j                         y # 1 sw Y   JxY wr   )r   r   r   rw   r   r   r   r   r   s      r   test_warnings_emitted_classz(RemovalTests.test_warnings_emitted_class.  sn    $$D1 	W!!(+F	 	CL)AJ+QZZ8	 	r   c                    t        j                  d      5 }t        j                  d       t                d d d        | j	                  dt                     |d   }| j	                  t        |j                         y # 1 sw Y   JxY wr   )r   r   r   r{   r   r   r@   r   r   s      r   #test_pending_warnings_emitted_classz0RemovalTests.test_pending_warnings_emitted_class6  sn    $$D1 	W!!(+H	 	CL)AJ2AJJ?	 	r   c                 P   t        j                  d      5 }t        j                  d       t               }d d d        | j	                  dt                     |d   }| j	                  t        |j                         | j	                  dj                         y # 1 sw Y   fxY w)NTr   r   r   r   r   )	r   r   r   r|   r   r   r   r   r   r,   r   sr   s       r   *test_pending_warnings_emitted_class_directz7RemovalTests.test_pending_warnings_emitted_class_direct>  s    $$D1 	W!!(+
A	 	CL)AJ+QZZ8(	 	s    BB%c                 R   t        j                  d      5 }t        j                  d       t        d      }d d d        | j	                  dt                     |d   }| j	                  t        |j                         | j	                  dj                         y # 1 sw Y   fxY w)NTr   r   star_jrr   r   )	r   r   r   r   r   r   r   r   r   rI  s       r   +test_pending_warnings_emitted_class_inheritz8RemovalTests.test_pending_warnings_emitted_class_inheritG  s    $$D1 	&W!!(+9%A	& 	CL)AJ+QZZ8AFF+	& 	&s   !BB&c                 8   t               }t        j                  d      5 }t        j                  d       |j	                          d d d        | j                  dt                     |d   }| j                  t        |j                         y # 1 sw Y   JxY wr   )	r   r   r   r   r   r   r   r   r   r,   zeonr   r   s       r   $test_warnings_emitted_instancemethodz1RemovalTests.test_warnings_emitted_instancemethodP  s|    x$$D1 	"W!!(+!	" 	CL)AJ+QZZ8	" 	"   &BBc                 8   t               }t        j                  d      5 }t        j                  d       |j	                          d d d        | j                  dt                     |d   }| j                  t        |j                         y # 1 sw Y   JxY wr   )	r   r   r   r   r   r   r   r@   r   rP  s       r   ,test_pending_warnings_emitted_instancemethodz9RemovalTests.test_pending_warnings_emitted_instancemethodY  s|    x$$D1 	!W!!(+ 	! 	CL)AJ2AJJ?	! 	!rS  c                 8   t               }t        j                  d      5 }t        j                  d       |j	                          d d d        | j                  dt                     |d   }| j                  t        |j                         y # 1 sw Y   JxY wr   )	r   r   r   r   r   r   r   r@   r   rP  s       r   )test_pending_warnings_emitted_classmethodz6RemovalTests.test_pending_warnings_emitted_classmethodb  |    x$$D1 	W!!(+	 	CL)AJ2AJJ?	 	rS  c                 8   t               }t        j                  d      5 }t        j                  d       |j	                          d d d        | j                  dt                     |d   }| j                  t        |j                         y # 1 sw Y   JxY wr   )	r   r   r   r   r   r   r   r   r   rP  s       r   r	  z.RemovalTests.test_warnings_emitted_classmethodk  z    x$$D1 	W!!(+OO	 	CL)AJ+QZZ8	 	rS  c                 8   t               }t        j                  d      5 }t        j                  d       |j	                          d d d        | j                  dt                     |d   }| j                  t        |j                         y # 1 sw Y   JxY wr   )	r   r   r   r   r   r   r   r   r   rP  s       r   "test_warnings_emitted_staticmethodz/RemovalTests.test_warnings_emitted_staticmethodt  rZ  rS  c                 8   t               }t        j                  d      5 }t        j                  d       |j	                          d d d        | j                  dt                     |d   }| j                  t        |j                         y # 1 sw Y   JxY wr   )	r   r   r   r   r   r   r   r@   r   rP  s       r   *test_pending_warnings_emitted_staticmethodz7RemovalTests.test_pending_warnings_emitted_staticmethod}  rX  rS  c                 6   t        j                  d      5 }t        j                  d       t        j                  t
               d d d        | j                  dt                     |d   }| j                  t        |j                         y # 1 sw Y   JxY wr   )
r   r   r   r   removed_moduler;   r   r   r   r   r   s      r   test_removed_modulez RemovalTests.test_removed_module  sw    $$D1 	.W!!(+##H-	. 	CL)AJ+QZZ8	. 	.r   c                 B   t        j                  d      5 }t        j                  d       t        j                  t
        t               d d d        | j                  dt                     |d   }| j                  t        |j                         y # 1 sw Y   JxY w)NTr   r   r   r   r   )
r   r   r   r   r`  r;   r@   r   r   r   r   s      r   test_pending_removed_modulez(RemovalTests.test_pending_removed_module  s    $$D1 	HW!!(+##H-FH	H 	CL)AJ2AJJ?	H 	Hs   5BBc                 N    | j                  t        t        j                  d       y rX   )r   r   r   r`  r+   s    r   test_removed_module_bad_typez)RemovalTests.test_removed_module_bad_type  s    )X%<%<a@r   N)r;   r<   r=   r  r  r   r)  r.  r1  r5  r9  r<  r?  rA  rC  rE  rG  rK  rN  rR  rU  rW  r	  r\  r^  ra  rc  re  r   r   r   r  r    s    6%7*$	4*$	999@9@9@),9@@99@9@Ar   r  r  )r   )r   r   )7r   r   r   debtcollector.fixturesr   r   r   r   debtcollector.testsr   	test_baser   renamed_kwargr   r   r@   r   r   updated_kwarg_default_valuer#   r%   objectr'   rD   rS   r^   r   rf   ri   rk   rn   rq   rt   moved_functionr;   ru   rw   r{   removed_classr|   r   r   r   r   r   TestCaser   r   r   r   r   r   r   r  r  r   r   r   <module>ro     s      *  " ! 1 " vv& ' vv0IJ K vvt4 5 &%%feX>* ?**v *v Bf B 
   34 5   34 5
 %$$Z(K 	6 	 	 34	V 	 5	 
#v  $
 +V +\ Uz<B
e
L()BD*I.. *$9	 2 2 $9N%*	** %*P
*9%% 
*9	** 9!@i(( !@H8<y)) 8<vAi(( A,[A9%% [Ar   