
    7bhMM                     ,   d dl Z d dlZd dlmZ  G d de      Z G d de      Z G d de      Z G d	 d
e      Z G d de	      Z
 G d de
      Z G d de	      Z G d de      Z G d de
      Z G d de	      Z G d dej                         Z G d de      Z G d de      Z G d de      Z G d d ej                         Z G d! d"      Z G d# d$eej                         Z G d% d&eej                         Zed'k(  r ej6                          yy)(    N)supportc                       e Zd Zy)PropertyBaseN__name__
__module____qualname__     </opt/python-3.12.12/usr/lib/python3.12/test/test_property.pyr   r          r   r   c                       e Zd Zy)PropertyGetNr   r
   r   r   r   r      r   r   r   c                       e Zd Zy)PropertySetNr   r
   r   r   r   r      r   r   r   c                       e Zd Zy)PropertyDelNr   r
   r   r   r   r      r   r   r   c                   j    e Zd Zd Zed        Zej                  d        Zej                  d        Zy)	BaseClassc                     d| _         y )N   _spamselfs    r   __init__zBaseClass.__init__   s	    
r   c                     | j                   S )BaseClass.getterr   r   s    r   spamzBaseClass.spam        zzr   c                     || _         y Nr   r   values     r   r   zBaseClass.spam   s	    
r   c                     | ` y r"   r   r   s    r   r   zBaseClass.spam!   s    Jr   N)r   r   r	   r   propertyr   setterdeleterr
   r   r   r   r      sK       
[[  
\\ r   r   c                       e Zd Zej                  j
                  d        Zej                  d        Zej                  d        Zy)SubClassc                 ,    t        | j                        )SubClass.getter)r   r   r   s    r   r   zSubClass.spam'   s     $**%%r   c                 ,    t        | j                        r"   )r   r   r#   s     r   r   zSubClass.spam,       $**%%r   c                 ,    t        | j                        r"   )r   r   r   s    r   r   zSubClass.spam0   r.   r   N)r   r   r	   r   r   getterr'   r(   r
   r   r   r*   r*   %   sN    ^^& & 
[[& & 
\\& &r   r*   c                   *    e Zd ZdZd Z eed      Zy)PropertyDocBase   c                     | j                   S r"   r   r   s    r   	_get_spamzPropertyDocBase._get_spam6   s    zzr   spam spam spamdocN)r   r   r	   r   r5   r&   r   r
   r   r   r2   r2   4   s    EI#34Dr   r2   c                   D    e Zd Zej                  j
                  d        Zy)PropertyDocSubc                     | j                   S )z*The decorator does not use this doc stringr   r   s    r   r   zPropertyDocSub.spam;   r    r   N)r   r   r	   r2   r   r0   r
   r   r   r:   r:   :   s        !r   r:   c                   D    e Zd Zej                  j
                  d        Zy)PropertySubNewGetterc                      y)new docstringr   r
   r   s    r   r   zPropertySubNewGetter.spamA        r   N)r   r   r	   r   r   r0   r
   r   r   r=   r=   @   s    ^^ r   r=   c                   @    e Zd Zed        Zej
                  d        Zy)PropertyNewGetterc                      y)zoriginal docstringr3   r
   r   s    r   r   zPropertyNewGetter.spamG   r@   r   c                      y)r?      r
   r   s    r   r   zPropertyNewGetter.spamK   r@   r   N)r   r   r	   r&   r   r0   r
   r   r   rB   rB   F   s,      
[[ r   rB   c                      e Zd Zd Zd Z ej                  ej                  j                  dk\  d      d        Z
 ej                  ej                  j                  dk\  d      d        Zd Z ej                  ej                  j                  dk\  d      d        Zd	 Z ej                  ej                  j                  dk\  d      d
        Z ej                  ej                  j                  dk\  d      d        Zej$                  d        Zej$                  d        Z ej                  ej                  j                  dk\  d      d        Z ej                  ej                  j                  dk\  d      d        Zd Zd Zy)PropertyTestsc                    t               }| j                  |j                  d       | j                  |j                  d       d|_        | j                  |j                  d       | j                  |j                  d       t	        |d       | j                  t        |d              | j                  t        |d              d|_        | j                  |j                  d       | j                  |j                  d       y )Nr   
   r   r      )r   assertEqualr   r   delattr
assertTruehasattrr   bases     r   !test_property_decorator_baseclassz/PropertyTests.test_property_decorator_baseclassQ   s    {A&Q'	B'R(fGD&112GD'223	B'R(r   c                     t               }| j                  t        t        |d       | j                  t        t
        |dd        | j                  t        t        |d       y )Nr   )r*   assertRaisesr   getattrr   setattrr   rL   r   subs     r    test_property_decorator_subclassz.PropertyTests.test_property_decorator_subclass`   sG    j+wV<+wVTB+wV<r      )Docstrings are omitted with -O2 and abovec                 x    t               }| j                  |j                  j                  j                  d       y )Nr,   )r*   rK   	__class__r   __doc__rV   s     r   $test_property_decorator_subclass_docz2PropertyTests.test_property_decorator_subclass_docg   s,     j++335FGr   c                 x    t               }| j                  |j                  j                  j                  d       y )Nr   )r   rK   r\   r   r]   rO   s     r   %test_property_decorator_baseclass_docz3PropertyTests.test_property_decorator_baseclass_docm   s,     {,,446HIr   c                     t               }t               }| j                  |j                  j                  j
                  d       | j                  |j                  j                  j
                  d       y )Nr6   )r2   r:   rK   r\   r   r]   )r   rP   rW   s      r   test_property_decorator_docz)PropertyTests.test_property_decorator_docs   sT     ,,446FG++335EFr   c                 \   t               }| j                  |j                  d       | j                  |j                  j                  j                  d       t               }| j                  |j                  d       | j                  |j                  j                  j                  d       y )Nr   r?   rE   )r=   rK   r   r\   r]   rB   )r   newgettersub	newgetters      r   !test_property_getter_doc_overridez/PropertyTests.test_property_getter_doc_overridey   s     ,-**A.//44<<oN%'	+,,1199?Kr   c                 d   ddg dgddfD ]B   G fddt               }| j                  |j                  j                  t	                     D  G d d	t               | j                  t              5   G fd
dt               }|j                  j                   d d d        y # 1 sw Y   y xY w)NTFr3    1c                   4    e Zd Zd ZW  e_         ee      Zy)EPropertyTests.test_property___isabstractmethod__descriptor.<locals>.Cc                      y r"   r
   r   s    r   foozIPropertyTests.test_property___isabstractmethod__descriptor.<locals>.C.foo       r   Nr   r   r	   rm   __isabstractmethod__r&   )vals   r   Crk      s    +.(smr   rr   c                       e Zd Zd ZeZy)KPropertyTests.test_property___isabstractmethod__descriptor.<locals>.NotBoolc                     t               r"   )
ValueErrorr   s    r   __bool__zTPropertyTests.test_property___isabstractmethod__descriptor.<locals>.NotBool.__bool__   s
     l"r   N)r   r   r	   rw   __len__r
   r   r   NotBoolrt      s    #Gr   ry   c                   >    e Zd Zd Z W         e_         ee      Zy)rk   c                      y r"   r
   r   s    r   rm   zIPropertyTests.test_property___isabstractmethod__descriptor.<locals>.C.foo   rn   r   Nro   )ry   s   r   rr   zEPropertyTests.test_property___isabstractmethod__descriptor.<locals>.C   s    +29(smr   )objectassertIsrm   rp   boolrS   rv   )r   rr   ry   rq   s     @@r   ,test_property___isabstractmethod__descriptorz:PropertyTests.test_property___isabstractmethod__descriptor   s    %aS"c2C$F $
 MM!%%44d3i@ 3	f 	 z*$F $
 EE&& +**s   5(B&&B/c                     t        d      }| j                  |j                  d       d|_        | j                  |j                  d       y )Nbasicr7   extendedr&   rK   r]   )r   ps     r   "test_property_builtin_doc_writablez0PropertyTests.test_property_builtin_doc_writable   s=     !G,	J/r   c                 &    G d dt               } |       }| j                  |j                  j                  j                  d       d|j                  j                  _        | j                  |j                  j                  j                  d       y )Nc                       e Zd Zed        Zy)OPropertyTests.test_property_decorator_doc_writable.<locals>.PropertyWritableDocc                      y)Eggseggsr
   r   s    r   r   zTPropertyTests.test_property_decorator_doc_writable.<locals>.PropertyWritableDoc.spam   s     r   N)r   r   r	   r&   r   r
   r   r   PropertyWritableDocr      s     r   r   r   Spam)r|   rK   r\   r   r]   )r   r   rW   s      r   $test_property_decorator_doc_writablez2PropertyTests.test_property_decorator_doc_writable   sj    	& 	 "#++33V<%+"++33V<r   c                     t        j                  t        d      }t        dddd      } |       }t	        d      D ]  }|j                  dddd        | j                   |       |z
  dd	       y )
Ngettotalrefcountfgetfsetfdelr8   d   r   rI   delta)r   get_attributesysr&   ranger   assertAlmostEqual)r   r   	fake_proprefs_beforeis        r   test_refleaks_in___init__z'PropertyTests.test_refleaks_in___init__   sn    "006HIVVVU;	&(sAvvvu= /1K?"Mr   c                    t        j                  t        d      }t               } |       }t	        d      D ]  }|j                  d       } | j                  |j                         t	        d      D ]  }|j                  d       } | j                  |j                         t	        d      D ]  }|j                  d       } | j                  |j                         | j                   |       |z
  dd       y )Nr   r   r   rI   r   )r   r   r   r&   r   r0   assertIsNoner   r'   r   r(   r   r   )r   r   propr   r   s        r   test_gh_115618zPropertyTests.test_gh_115618   s     #006HIz&(sA;;t$D $))$sA;;t$D $))$sA<<%D $))$/1K?"Mr   c                 P     G d d      }| j                  |j                  d       y )Nc                   &    e Zd Zeed               Zy),PropertyTests.test_class_property.<locals>.Ac                      d| j                   z  S )NzA doc for %r)r   clss    r   r]   z4PropertyTests.test_class_property.<locals>.A.__doc__   s     &44r   N)r   r   r	   classmethodr&   r]   r
   r   r   Ar      s    5  5r   r   zA doc for 'A'rK   r]   r   r   s     r   test_class_propertyz!PropertyTests.test_class_property   s"    	5 	5
 	O4r   c                 P     G d d      }| j                  |j                  d       y )Nc                   *    e Zd ZdZeed               Zy)5PropertyTests.test_class_property_override.<locals>.AFirstc                      y)NSecondr
   r   s    r   r]   z=PropertyTests.test_class_property_override.<locals>.A.__doc__   s      r   N)r   r   r	   r]   r   r&   r
   r   r   r   r      s        r   r   r   r   r   s     r   test_class_property_overridez*PropertyTests.test_class_property_override   s"    	  	  	H-r   c                     t               }dD ]8  }| j                  t        d| d      5   |j                  dg|z    d d d        : y # 1 sw Y   ExY w)N)r   r3      z3^__set_name__\(\) takes 2 positional arguments but z were given$r   )r&   assertRaisesRegex	TypeError__set_name__)r   r   r   s      r   %test_property_set_name_incorrect_argsz3PropertyTests.test_property_set_name_incorrect_args   s[    JA''FqcV !q*	   s   A		A	c                      G d dt               } G d d      }t         j                  |      }|j                  |d       |j                  d       }y )Nc                       e Zd Zd Zy)EPropertyTests.test_property_setname_on_property_subclass.<locals>.proc                      y)Nabcdefr
   )typargskwargss      r   __new__zMPropertyTests.test_property_setname_on_property_subclass.<locals>.pro.__new__   s    r   N)r   r   r	   r   r
   r   r   pror      s     r   r   c                       e Zd Zy)CPropertyTests.test_property_setname_on_property_subclass.<locals>.ANr   r
   r   r   r   r      s    r   r   r3   c                      yNr3   r
   r   s    r   <lambda>zJPropertyTests.test_property_setname_on_property_subclass.<locals>.<lambda>   s    1r   )r&   r   r   r0   )r   r   r   r   nps        r   *test_property_setname_on_property_subclassz8PropertyTests.test_property_setname_on_property_subclass   sF    	 ( 	 	 	 S!	q!XXn%r   N)r   r   r	   rQ   rX   unittestskipIfr   flagsoptimizer^   r`   rb   rf   r   r   r   r   refcount_testr   r   r   r   r   r   r
   r   r   rG   rG   P   s   )= X__SYY''1,@BHBH X__SYY''1,@BJBJG X__SYY''1,@BLBL'. X__SYY''1,@B0B0 X__SYY''1,@B=B= N N N N" X__SYY''1,@B5B5 X__SYY''1,@B.B.+&r   rG   c                       e Zd ZdZy)PropertySubThis is a subclass of propertyN)r   r   r	   r]   r
   r   r   r   r      s    (r   r   c                       e Zd Zy)PropertySubWoDocNr   r
   r   r   r   r     r   r   r   c                       e Zd ZdZdZy)PropertySubSlotsz5This is a subclass of property that defines __slots__r
   N)r   r   r	   r]   	__slots__r
   r   r   r   r     s
    ?Ir   r   c                   <   e Zd Zej                  d        Zd Z ej                  e	j                  j                  dk\  d      d        Z ej                  e	j                  j                  dk\  d      d        Z ej                  e	j                  j                  dk\  d      d        Z ej                  e	j                  j                  dk\  d      d        Z ej                  e	j                  j                  dk\  d      d	        Z ej                  e	j                  j                  dk\  d      d
        Zd Z ej                  e	j                  j                  dk\  d      d        Z ej                  e	j                  j                  dk\  d      d        Zy)PropertySubclassTestsc                 v    | j                  t              5   G d dt              }d d d        y # 1 sw Y   y xY w)Nc                       e Zd Zed        Zy)FPropertySubclassTests.test_slots_docstring_copy_exception.<locals>.Fooc                      y)z5Trying to copy this docstring will raise an exceptionr3   r
   r   s    r   r   zKPropertySubclassTests.test_slots_docstring_copy_exception.<locals>.Foo.spam  s     r   N)r   r   r	   r   r   r
   r   r   Foor     s    ! "r   r   )rS   AttributeErrorr|   r   r   s     r   #test_slots_docstring_copy_exceptionz9PropertySubclassTests.test_slots_docstring_copy_exception
  s*     ~.f  /..s   /8c                      G d dt               } |       }| j                  t        |dd              d } ||      }| j                  t        |dd              y )Nc                       e Zd ZdZy)QPropertySubclassTests.test_property_with_slots_no_docstring.<locals>.slotted_proprm   Nr   r   r	   r   r
   r   r   slotted_propr          Ir   r   r]   c                       y)N   r
   r
   r   r   undocumented_getterzXPropertySubclassTests.test_property_with_slots_no_docstring.<locals>.undocumented_getter       r   )r&   r   rT   )r   r   r   r   s       r   %test_property_with_slots_no_docstringz;PropertySubclassTests.test_property_with_slots_no_docstring  sW    	!8 	! N'!Y56	 ,-'!Y56r   rY   rZ   c                      G d dt               } |d      }| j                  |j                         d }| j                  t              5   ||      }d d d        y # 1 sw Y   y xY w)Nc                       e Zd ZdZy)_PropertySubclassTests.test_property_with_slots_docstring_silently_dropped.<locals>.slotted_propr   Nr   r
   r   r   r   r   *  r   r   r   	what's upr7   c                       y)zgetter doc.r   r
   r
   r   r   documented_getterzdPropertySubclassTests.test_property_with_slots_docstring_silently_dropped.<locals>.documented_getter0      r   )r&   r   r]   rS   r   r   r   r   r   s       r   3test_property_with_slots_docstring_silently_droppedzIPropertySubclassTests.test_property_with_slots_docstring_silently_dropped&  sX    	!8 	! [)!))$	 ~../A /..s   	AA'c                      G d dt               } |d      }| j                  d|j                         d } ||      }| j                  d|j                         y )Nc                       e Zd ZdZy)cPropertySubclassTests.test_property_with_slots_and_doc_slot_docstring_present.<locals>.slotted_prop)rm   r]   Nr   r
   r   r   r   r   =  s    *Ir   r   r   r7   c                       y)what's up getter doc?r   r
   r
   r   r   r   zhPropertySubclassTests.test_property_with_slots_and_doc_slot_docstring_present.<locals>.documented_getterC  r   r   r   r   r   s       r   7test_property_with_slots_and_doc_slot_docstring_presentzMPropertySubclassTests.test_property_with_slots_and_doc_slot_docstring_present9  sU    	+8 	+ [)aii0	 *+0!))<r   c                 z   | j                  t        j                  dd       t        d d d d      j                  }| j                  |dd       d }d }t        t        t        fD ]  } ||d d d      j                  }| j                  |dd|j
                  z          ||d d d       j                  }| j                  |dd	|j
                  z          ||d d d      j                  }| j                  |dd|j
                  z          ||d d d       j                  }| j                  |d
|j
                  z          y )Nr   z+Docstring of `property` subclass is ignoredzissue 41287 is fixedz;Subclasses of `property` ignores `doc` constructor argumentc                      y)Getter docstringNr
   xs    r   r0   z5PropertySubclassTests.test_issue41287.<locals>.getterU      r   c                      y r"   r
   r  s    r   getter_wo_docz<PropertySubclassTests.test_issue41287.<locals>.getter_wo_docX  s    r   z1Getter overrides explicit property docstring (%s)r   z&Getter docstring is not picked-up (%s)z3Property class doc appears in instance __doc__ (%s))rK   r   r]   r&   r   r   r   )r   r8   r0   r  pss        r   test_issue41287z%PropertySubclassTests.test_issue41287J  sP    	,,.NF	H $d,BCKK4V	X	#	 K)99BVT4)?@HHCS"8PSUS^S^^` VT4.66CS"46^acalal6lm]D$0FGOOCS"8PSUS^S^^` ]D$5==Cc#X[][f[f#fg :r   c                 n     G d dt               }| j                  |j                  j                  d       y )Nc                       e Zd Zed        Zy)6PropertySubclassTests.test_docstring_copy.<locals>.Fooc                      y)!spam wrapped in property subclassr3   r
   r   s    r   r   z;PropertySubclassTests.test_docstring_copy.<locals>.Foo.spamn       r   Nr   r   r	   r   r   r
   r   r   r   r
  m       r   r   r  r|   rK   r   r]   r   s     r   test_docstring_copyz)PropertySubclassTests.test_docstring_copyj  s.    	& 	
 	HH/	1r   c                    d }d }d }t        |ddd      }|j                  |      }| j                  |j                  d       | j                  |j                  d       t        |ddd      }|j                  |      }| j                  |j                  d       | j                  |j                  d       t        |ddd      }|j                  |      }| j                  |j                  d       | j                  |j                  d       t        |ddd      }d|_        |j                  |      }| j                  |j                  d       | j                  |j                  d       t        |ddd      }d|_        |j                  |      }| j                  |j                  d       | j                  |j                  d       y)	a5  
        Property tries to provide the best docstring it finds for its instances.
        If a user-provided docstring is available, it is preserved on copies.
        If no docstring is available during property creation, the property
        will utilize the docstring from the getter if available.
        c                      yr   r
   r   s    r   getter1z;PropertySubclassTests.test_docstring_copy2.<locals>.getter1  r   r   c                      y)doc 2rY   r
   r   s    r   getter2z;PropertySubclassTests.test_docstring_copy2.<locals>.getter2  r   r   c                      y)doc 3r   r
   r   s    r   getter3z;PropertySubclassTests.test_docstring_copy2.<locals>.getter3  r   r   Nzdoc-Ar  r  user)r&   r0   rK   r]   )r   r  r  r  r   p2s         r   test_docstring_copy2z*PropertySubclassTests.test_docstring_copy2v  s   			 WdD'2XXgG,W- WdD'2XXgG,W- WdD$/XXgG,W- WdD$/	XXgF+W- WdD$/	XXgF+V,r   c                     | j                  t        d      j                  d       | j                  t        d      j                  d        G d d      }| j                  |j                  j                  d       y )Nzexplicit docr7   c                   \    e Zd Z ed      Zej
                  d        Zd Z ede      Zy);PropertySubclassTests.test_prefer_explicit_doc.<locals>.Foozspam explicit docr7   c                      y)zignored as doc already setr3   r
   r   s    r   r   z@PropertySubclassTests.test_prefer_explicit_doc.<locals>.Foo.spam  r  r   c                      y)zignored as doc set directlyNr
   r   s    r   _stuff_getterzIPropertySubclassTests.test_prefer_explicit_doc.<locals>.Foo._stuff_getter  r  r   stuff doc argument)r8   r   N)r   r   r	   r   r   r0   r#  stuffr
   r   r   r   r     s5    #67D[[ 2$8}MEr   r   r$  )rK   r&   r]   r   r%  r   s     r   test_prefer_explicit_docz.PropertySubclassTests.test_prefer_explicit_doc  sc     	n5==~N8@@.Q
	N 
	N 	**,@Ar   c                      G d d      }| j                  t         |             j                  d        | j                  t         |             j                  d        y )Nc                       e Zd Zed        Zy)CPropertySubclassTests.test_property_no_doc_on_getter.<locals>.NoDocc                     t         r"   )r   r   s    r   r]   zKPropertySubclassTests.test_property_no_doc_on_getter.<locals>.NoDoc.__doc__  s    $$r   N)r   r   r	   r&   r]   r
   r   r   NoDocr)    s    % %r   r+  )rK   r&   r]   r   )r   r+  s     r   test_property_no_doc_on_getterz4PropertySubclassTests.test_property_no_doc_on_getter  sH    	% 	%
 	%'*22D9UW-55t<r   c                     G d dt                       }| j                  |j                  d       d|_        | j                  |j                  d       | j                  j                  j                  d        G fdd      } |       }| j                  |j                  d       d|_        | j                  |j                  d	       | j                  |j                  j                  d       y )
Nc                   F    e Zd Zd Zed        Zej                  d        Zy)OPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.Fooc                     d| _         y r   r   r   s    r   r   zXPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.Foo.__init__  s    Q
r   c                     | j                   S )r  r   r   s    r   r   zTPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.Foo.spam  s     zz!r   c                     || _         y)zthis docstring is ignoredNr   r#   s     r   r   zTPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.Foo.spam  s     #
r   N)r   r   r	   r   r   r   r'   r
   r   r   r   r/    s/    ." " [[# #r   r   r3   rY   r  c                   H    e Zd ZW  j                  j                  d        Zy)RPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.FooSubc                     d| _         y)zanother ignored docstringr   Nr   r#   s     r   r   zWPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.FooSub.spam  s     $
r   N)r   r   r	   r   r'   )r   s   r   FooSubr4    s    XX__$ $r   r6     r   r  )r   rm   r6  foosubr   s       @r   ,test_property_setter_copies_getter_docstringzBPropertySubclassTests.test_property_setter_copies_getter_docstring  s    		#& 		# e1%1%HH/	1	$S 	$
 a(f-KK/	1r   c                      G d dt               }| j                  |j                  j                  d        G d dt                G fdd      }| j                  |j                  j                  d       y )Nc                   @    e Zd Zed        Zej
                  d        Zy)IPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.Fooc                      yza docstringr3   r
   r   s    r   r   zNPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.Foo.spam  r  r   c                      ya new docstringrY   r
   r   s    r   r   zNPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.Foo.spam  r  r   N)r   r   r	   r   r   r0   r
   r   r   r   r<    s,      [[ r   r   rA  c                       e Zd Zed        Zy)MPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.FooBasec                      yr>  r
   r   s    r   r   zRPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.FooBase.spam  r  r   Nr  r
   r   r   FooBaserC    r  r   rE  c                   H    e Zd ZW  j                  j                  d        Zy)JPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.Foo2c                      yr@  r
   r   s    r   r   zOPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.Foo2.spam	  r  r   N)r   r   r	   r   r0   )rE  s   r   Foo2rG    s    \\   !r   rI  r  )r   r   rI  rE  s      @r   &test_property_new_getter_new_docstringz<PropertySubclassTests.test_property_new_getter_new_docstring  sa    	& 	 	))+<=	f 	
	7 	
 	))+<=r   N)r   r   r	   r   requires_docstringsr   r   r   r   r   r   r   r   r   r  r  r  r&  r,  r9  rJ  r
   r   r   r   r     s      !7 X__SYY''1,@B0B0" X__SYY''1,@B=B= X__SYY''1,@BhBh< X__SYY''1,@B1B1 X__SYY''1,@B8-B8-t X__SYY''1,@BBBB(
= X__SYY''1,@B1B1> X__SYY''1,@B>B>r   r   c                   @    e Zd ZdZdZdZd Zed        Zd Z	d Z
d Zy)_PropertyUnreachableAttributeNc                 8    | j                   j                  |      S r"   )
msg_formatformat)r   msgs     r   _format_exc_msgz-_PropertyUnreachableAttribute._format_exc_msg  s    %%c**r   c                 .    | j                         | _        y r"   )r   objr   s    r   
setUpClassz(_PropertyUnreachableAttribute.setUpClass  s    '')r   c                     | j                  t        | j                  d            5  | j                  j                   d d d        y # 1 sw Y   y xY w)Nzhas no getterr   r   rR  rT  rm   r   s    r   test_get_propertyz/_PropertyUnreachableAttribute.test_get_property  s5    ##ND4H4H4YZHHLL [ZZs   AAc                     | j                  t        | j                  d            5  d | j                  _        d d d        y # 1 sw Y   y xY w)Nzhas no setterrW  r   s    r   test_set_propertyz/_PropertyUnreachableAttribute.test_set_property   s5    ##ND4H4H4YZDHHL [ZZs   AA
c                     | j                  t        | j                  d            5  | j                  `d d d        y # 1 sw Y   y xY w)Nzhas no deleterrW  r   s    r   test_del_propertyz/_PropertyUnreachableAttribute.test_del_property$  s4    ##ND4H4HIY4Z[ \[[s	   <A)r   r   r	   rO  rT  r   rR  r   rU  rX  rZ  r\  r
   r   r   rM  rM    s9    J
C
C+   r   rM  c                   $    e Zd ZdZ G d d      Zy)$PropertyUnreachableAttributeWithNamezI^property 'foo' of 'PropertyUnreachableAttributeWithName\.cls' object {}$c                       e Zd Z e       Zy)(PropertyUnreachableAttributeWithName.clsN)r   r   r	   r&   rm   r
   r   r   r   r`  ,  s	    jr   r   N)r   r   r	   rO  r   r
   r   r   r^  r^  )  s    ]J r   r^  c                   <    e Zd ZdZ G d d      Z e       e_        y)"PropertyUnreachableAttributeNoNamezA^property of 'PropertyUnreachableAttributeNoName\.cls' object {}$c                       e Zd Zy)&PropertyUnreachableAttributeNoName.clsNr   r
   r   r   r   rd  3  s    r   r   N)r   r   r	   rO  r   r&   rm   r
   r   r   rb  rb  0  s    UJ  jCGr   rb  __main__)r   r   testr   	Exceptionr   r   r   r   r|   r   r*   r2   r:   r=   rB   TestCaserG   r&   r   r   r   r   rM  r^  rb  r   mainr
   r   r   <module>rj     s$     	9 		, 		, 		, 	 "&y &5f 5_ 9  k&H%% k&\)( )	x 	x E>H-- E>P 2+H(J[J[ )FHYHY  zHMMO r   