ó {G_Tc@s…ddlZddlZddlmZdefd„ƒYZdefd„ƒYZdefd„ƒYZd efd „ƒYZd e fd „ƒYZ d e fd„ƒYZ de fd„ƒYZ de fd„ƒYZ de fd„ƒYZde fd„ƒYZdejfd„ƒYZdefd„ƒYZdefd„ƒYZdejfd„ƒYZd„Zed kreƒndS(!iÿÿÿÿN(t run_unittestt PropertyBasecBseZRS((t__name__t __module__(((s./usr/local/lib/python2.7/test/test_property.pyRst PropertyGetcBseZRS((RR(((s./usr/local/lib/python2.7/test/test_property.pyR st PropertySetcBseZRS((RR(((s./usr/local/lib/python2.7/test/test_property.pyRst PropertyDelcBseZRS((RR(((s./usr/local/lib/python2.7/test/test_property.pyRst BaseClasscBsDeZd„Zed„ƒZejd„ƒZejd„ƒZRS(cCs d|_dS(Ni(t_spam(tself((s./usr/local/lib/python2.7/test/test_property.pyt__init__scCs|jS(sBaseClass.getter(R(R ((s./usr/local/lib/python2.7/test/test_property.pytspamscCs ||_dS(N(R(R tvalue((s./usr/local/lib/python2.7/test/test_property.pyR scCs |`dS(N(R(R ((s./usr/local/lib/python2.7/test/test_property.pyR !s(RRR tpropertyR tsettertdeleter(((s./usr/local/lib/python2.7/test/test_property.pyRs tSubClasscBsAeZejjd„ƒZejd„ƒZejd„ƒZRS(cCst|jƒ‚dS(sSubClass.getterN(RR(R ((s./usr/local/lib/python2.7/test/test_property.pyR 'scCst|jƒ‚dS(N(RR(R R ((s./usr/local/lib/python2.7/test/test_property.pyR ,scCst|jƒ‚dS(N(RR(R ((s./usr/local/lib/python2.7/test/test_property.pyR 0s(RRRR tgetterRR(((s./usr/local/lib/python2.7/test/test_property.pyR%stPropertyDocBasecBs)eZdZd„ZeeddƒZRS(icCs|jS(N(R(R ((s./usr/local/lib/python2.7/test/test_property.pyt _get_spam6stdocsspam spam spam(RRRRR R (((s./usr/local/lib/python2.7/test/test_property.pyR4s tPropertyDocSubcBseZejjd„ƒZRS(cCs|jS(s*The decorator does not use this doc string(R(R ((s./usr/local/lib/python2.7/test/test_property.pyR ;s(RRRR R(((s./usr/local/lib/python2.7/test/test_property.pyR:stPropertySubNewGettercBseZejjd„ƒZRS(cCsdS(s new docstringi((R ((s./usr/local/lib/python2.7/test/test_property.pyR As(RRRR R(((s./usr/local/lib/python2.7/test/test_property.pyR@stPropertyNewGettercBs)eZed„ƒZejd„ƒZRS(cCsdS(soriginal docstringi((R ((s./usr/local/lib/python2.7/test/test_property.pyR GscCsdS(s new docstringi((R ((s./usr/local/lib/python2.7/test/test_property.pyR Ks(RRR R R(((s./usr/local/lib/python2.7/test/test_property.pyRFst PropertyTestscBs˜eZd„Zd„Zejejjdkdƒd„ƒZ ejejjdkdƒd„ƒZ d„Z ejejjdkdƒd„ƒZ RS(cCsÌtƒ}|j|jdƒ|j|jdƒd|_|j|jdƒ|j|jdƒt|dƒ|jt|dƒ ƒ|jt|dƒ ƒd|_|j|jdƒ|j|jdƒdS(Nii R Ri(Rt assertEqualR Rtdelattrt assertTruethasattr(R tbase((s./usr/local/lib/python2.7/test/test_property.pyt!test_property_decorator_baseclassQs    cCsRtƒ}|jtt|dƒ|jtt|ddƒ|jtt|dƒdS(NR ( Rt assertRaisesRtgetattrRtsetattrtNoneRR(R tsub((s./usr/local/lib/python2.7/test/test_property.pyt test_property_decorator_subclass`s is)Docstrings are omitted with -O2 and abovecCs&tƒ}|j|jjjdƒdS(NsSubClass.getter(RRt __class__R t__doc__(R R#((s./usr/local/lib/python2.7/test/test_property.pyt$test_property_decorator_subclass_docgs cCs&tƒ}|j|jjjdƒdS(NsBaseClass.getter(RRR%R R&(R R((s./usr/local/lib/python2.7/test/test_property.pyt%test_property_decorator_baseclass_docms cCsHtƒ}tƒ}|j|jjjdƒ|j|jjjdƒdS(Nsspam spam spam(RRRR%R R&(R RR#((s./usr/local/lib/python2.7/test/test_property.pyttest_property_decorator_docss  cCsntƒ}|j|jdƒ|j|jjjdƒtƒ}|j|jdƒ|j|jjjdƒdS(Nis new docstringi(RRR R%R&R(R t newgettersubt newgetter((s./usr/local/lib/python2.7/test/test_property.pyt!test_property_getter_doc_overrideys   ( RRRR$tunittesttskipIftsystflagstoptimizeR'R(R)R,(((s./usr/local/lib/python2.7/test/test_property.pyRPs   t PropertySubcBseZdZRS(sThis is a subclass of property(RRR&(((s./usr/local/lib/python2.7/test/test_property.pyR2…stPropertySubSlotscBseZdZdZRS(s5This is a subclass of property that defines __slots__((RRR&t __slots__(((s./usr/local/lib/python2.7/test/test_property.pyR3ˆstPropertySubclassTestscBs†eZd„Zejejjdkdƒd„ƒZejejjdkdƒd„ƒZ ejejjdkdƒd„ƒZ RS(cCs>ydtfd„ƒY}Wntk r-n Xtdƒ‚dS(NtFoocBseZed„ƒZRS(cSsdS(s5Trying to copy this docstring will raise an exceptioni((R ((s./usr/local/lib/python2.7/test/test_property.pyR ‘s(RRR3R (((s./usr/local/lib/python2.7/test/test_property.pyR6ssAttributeError not raised(tobjecttAttributeErrort Exception(R R6((s./usr/local/lib/python2.7/test/test_property.pyt#test_slots_docstring_copy_exceptionŽs  is)Docstrings are omitted with -O2 and abovecCs0dtfd„ƒY}|j|jjdƒdS(NR6cBseZed„ƒZRS(cSsdS(s!spam wrapped in property subclassi((R ((s./usr/local/lib/python2.7/test/test_property.pyR žs(RRR2R (((s./usr/local/lib/python2.7/test/test_property.pyR6ss!spam wrapped in property subclass(R7RR R&(R R6((s./usr/local/lib/python2.7/test/test_property.pyttest_docstring_copyšs csÒdtfd„ƒY‰ˆƒ}|j|jdƒd|_|j|jdƒ|jˆjjdƒdˆf‡fd†ƒY}|ƒ}|j|jdƒd|_|j|jd ƒ|j|jjdƒdS( NR6cBs2eZd„Zed„ƒZejd„ƒZRS(cSs d|_dS(Ni(R(R ((s./usr/local/lib/python2.7/test/test_property.pyR ªscSs|jS(s!spam wrapped in property subclass(R(R ((s./usr/local/lib/python2.7/test/test_property.pyR «scSs ||_dS(sthis docstring is ignoredN(R(R R ((s./usr/local/lib/python2.7/test/test_property.pyR ¯s(RRR R2R R(((s./usr/local/lib/python2.7/test/test_property.pyR6©s iis!spam wrapped in property subclasstFooSubcseZˆjjd„ƒZRS(cSs d|_dS(sanother ignored docstringteggsN(R(R R ((s./usr/local/lib/python2.7/test/test_property.pyR »s(RRR R((R6(s./usr/local/lib/python2.7/test/test_property.pyR<ºsiR=(R7RR R&(R tfooR<tfoosub((R6s./usr/local/lib/python2.7/test/test_property.pyt,test_property_setter_copies_getter_docstring¦s       csxdtfd„ƒY}|j|jjdƒdtfd„ƒY‰dˆf‡fd†ƒY}|j|jjdƒdS(NR6cBs)eZed„ƒZejd„ƒZRS(cSsdS(s a docstringi((R ((s./usr/local/lib/python2.7/test/test_property.pyR ÌscSsdS(sa new docstringi((R ((s./usr/local/lib/python2.7/test/test_property.pyR Ðs(RRR2R R(((s./usr/local/lib/python2.7/test/test_property.pyR6Ëssa new docstringtFooBasecBseZed„ƒZRS(cSsdS(s a docstringi((R ((s./usr/local/lib/python2.7/test/test_property.pyR Ös(RRR2R (((s./usr/local/lib/python2.7/test/test_property.pyRAÕstFoo2cseZˆjjd„ƒZRS(cSsdS(sa new docstringi((R ((s./usr/local/lib/python2.7/test/test_property.pyR Ûs(RRR R((RA(s./usr/local/lib/python2.7/test/test_property.pyRBÚs(R7RR R&(R R6RB((RAs./usr/local/lib/python2.7/test/test_property.pyt&test_property_new_getter_new_docstringÇs  ( RRR:R-R.R/R0R1R;R@RC(((s./usr/local/lib/python2.7/test/test_property.pyR5Œs   cCstttƒdS(N(RRR5(((s./usr/local/lib/python2.7/test/test_property.pyt test_mainãst__main__(R/R-ttest.test_supportRR9RRRRR7RRRRRRtTestCaseRR R2R3R5RDR(((s./usr/local/lib/python2.7/test/test_property.pyts&   5W