+
    $i                         R t ^ RIt^ RIt^ RIt^ RIt ! R R]P
                  4      t ! R R]4      t]	! ]R4      '       d   R t
]P                  tR# R t
R	 tR# )
a[  A subclass of unittest.TestCase which checks for reference leaks.

To use:
- Use testing_refleak.BaseTestCase instead of unittest.TestCase
- Configure and compile Python with --with-pydebug

If sys.gettotalrefcount() is not available (because Python was built without
the Py_DEBUG option), then this module is a no-op and tests will run normally.
Nc                   B   a  ] tR t^t o RtR tR tR tR tR t	Rt
V tR# )	LocalTestResultzHA TestResult which forwards events to a parent object, except for Skips.c                P    \         P                  P                  V 4       Wn        R # N)unittest
TestResult__init__parent_result)selfr	   s   &&g/var/www/html/photoedit/myenv/lib/python3.14/site-packages/google/protobuf/internal/testing_refleaks.pyr   LocalTestResult.__init__   s      &&    c                <    V P                   P                  W4       R # r   )r	   addErrorr
   testerrors   &&&r   r   LocalTestResult.addError   s    ,r   c                <    V P                   P                  W4       R # r   )r	   
addFailurer   s   &&&r   r   LocalTestResult.addFailure"   s    !!$.r   c                    R # r    )r
   r   reasons   &&&r   addSkipLocalTestResult.addSkip%       r   c                    R # r   r   )r
   r   durations   &&&r   addDurationLocalTestResult.addDuration(   r   r   )r	   N)__name__
__module____qualname____firstlineno____doc__r   r   r   r   r   __static_attributes____classdictcell__)__classdict__s   @r   r   r      s&     P'-/		 	r   r   c                   D   a a ] tR t^,t oRt^tRV 3R lltR tRtVt	V ;t
# )ReferenceLeakCheckerMixinz:A mixin class for TestCase, which checks reference counts.c                .  < \        W P                  4      p\        VR R4      p\        V R R4      pV'       g	   V'       d   R# \        P                  P	                  4       V n        \        \        V `#  VR7       \        \        V `#  VR7       \        V4      p^ p. pV P                  4       p\        V4      V P                  8  dh   V P                  4       p\        \        V `#  VR7       V P                  4       p	W8  d   V^8  d   V^,          pKf  ^ pVP                  W,
          4       K  \        Wp4        V P                  V^ .V P                  ,          4       R#   \          d*    TP#                  T \$        P&                  ! 4       4        R# i ; i)__unittest_expecting_failure__FN)result)getattr_testMethodNamecopyregdispatch_tablecopy_saved_pickle_registrysuperr*   runr   _getRefcountslenNB_RUNSappendprintassertEqual	Exceptionr   sysexc_info)r
   r-   
testMethodexpecting_failure_methodexpecting_failure_classlocal_result
num_flakesrefcount_deltasoldrefcountnewrefcount	__class__s   &&        r   r5   ReferenceLeakCheckerMixin.run1   s_   334J&z3SUZ[%d,LeT":
 #*"8"8"="="?D 

#T.f.=	
#T.f.="6*LJO $$&K
o

-&&(k%t00E&&(k 
	"zA~
 	a
j[67	/ ,
dll(:; ,oodCLLN+,s   :$E   0FFc                   \        \        R 4      '       d   \        P                  ! 4        M\        P                  ! 4        \        P
                  P                  4        \        P
                  P                  V P                  4       \        P                  ! 4        \        P                  ! 4        \        P                  ! 4        \        P                  ! 4       # )_clear_internal_caches)hasattrr=   rJ   _clear_type_cacher0   r1   clearupdater3   gccollectgettotalrefcount)r
   s   &r   r6   'ReferenceLeakCheckerMixin._getRefcounts^   s    s,--	  "	  "!!$"="=> JJLJJLJJL!!r   )r3   r   )r!   r"   r#   r$   r%   r8   r5   r6   r&   r'   __classcell__)rG   r(   s   @@r   r*   r*   ,   s     B'+,Z" "r   r*   rQ   c                     \         3V P                  ,           p\        V 4      ! V P                  V\	        V P
                  4      4      pV# r   )r*   	__bases__typer!   dict__dict__)
test_class	new_bases	new_classs   &  r   TestCaser\   o   sC    *,z/C/CCIZ YZ-@-@(ACIr   c                     V # r   r   )rY   s   &r   r\   r\   y   s    r   c                     ? R  pV# )c                     V # r   r   )funcs   &r   Same&SkipReferenceLeakChecker.<locals>.Same~   s    kr   r   )r   ra   s   & r   SkipReferenceLeakCheckerrc   |   s    Kr   )r%   r0   rO   r=   r   r   r   objectr*   rK   r\   skiprc   r   r   r   <module>rf      sb     	 
 	h)) 	(>" >"B 3"##
 &]]
r   