+
    /i                        R t ^ RIt^ RIHt ^ RIHtHtHtHtH	t	 ^ RI
Ht ^ RIt]P                  R 4       tR tR t]P"                  P%                  ]	RR	7      R
 4       t]P"                  P%                  ]	RR	7      R 4       t]P"                  P%                  ]	RR	7      R 4       t]P"                  P%                  ]	RR	7      R 4       tR# )z=Test for assert_deallocated context manager and gc utilities
NLock)set_gc_stategc_stateassert_deallocatedReferenceErrorIS_PYPY)assert_equalc                      \        4       # Nr        \/var/www/html/photoedit/myenv/lib/python3.14/site-packages/scipy/_lib/tests/test__gcutils.pygc_lockr      s	    6Mr   c                    T ;_uu_ 4        \         P                  ! 4       p R F  p\         P                  ! 4        \        V4       \	        \         P                  ! 4       V4       \         P
                  ! 4        \        V4       \	        \         P                  ! 4       V4       K  	  V'       d   \         P                  ! 4        RRR4       R#   T'       d   \         P                  ! 4        i i ; i  + '       g   i     R# ; iTNTF)gc	isenabledenabler   r	   disable)r   	gc_statusstates   &  r   test_set_gc_stater      s    	LLN	
	&		U#R\\^U3

U#R\\^U3 ' 		 
 		  
s#   C3BC)C3 C00C33D	c                    T ;_uu_ 4        \         P                  ! 4       p R F  p\        V4       R F  p\        V4      ;_uu_ 4        \	        \         P                  ! 4       V4       RRR4       \	        \         P                  ! 4       V4       \        V4      ;_uu_ 4        \	        \         P                  ! 4       V4       \        V'       * 4       RRR4       \	        \         P                  ! 4       V4       K  	  K  	  V'       d   \         P
                  ! 4        RRR4       R#   + '       g   i     L; i  + '       g   i     Lq; i  T'       d   \         P
                  ! 4        i i ; i  + '       g   i     R# ; ir   )r   r   r   r   r	   r   )r   r   	pre_state
with_states   &   r   test_gc_stater   #   s    	LLN		*	Y'"/J!*--$R\\^Z@ . !;!*--$R\\^Z@$^4 . !; #0 + 		% 
 .-
 .-
 		 # 
sR   E3(E
 D**:E$0D=/EE3*D:5E=EE E00E33F	zTest not meaningful on PyPy)reasonc                     ! R  R4      pT ;_uu_ 4        R F  p\        V4      ;_uu_ 4        \        V^ ^R4      ;_uu_ 4       p\        VP                  R4       ?RRR4       \        V^ ^RR7      ;_uu_ 4         RRR4       \        \        P
                  ! 4       V4       RRR4       K  	  RRR4       R#   + '       g   i     Lf; i  + '       g   i     LX; i  + '       g   i     K  ; i  + '       g   i     R# ; i)c                   *   a  ] tR t^=t o RR ltRtV tR# )"test_assert_deallocated.<locals>.Cc                    W0n         R # r   name)selfarg0arg1r$   s   &&&&r   __init__+test_assert_deallocated.<locals>.C.__init__>   s    Ir   r#   N)myname__name__
__module____qualname____firstlineno__r(   __static_attributes____classdictcell____classdict__s   @r   Cr!   =   s     	 	r   r4   zanother nameNz
third namer#   r   )r   r   r	   r$   r   r   )r   r4   
gc_currentcs   &   r   test_assert_deallocatedr7   :   s      
'J*%%'1a@@A 8 A (1alCC DR\\^Z8 &% ( 
 A@ DC &%% 
sR   C5C!B;C!<C>'C!%C5;CC!CC!!C2,	C55D	c            	           ! R  R4      p \         P                  ! \        4      ;_uu_ 4        \        V 4      ;_uu_ 4       p RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)c                       ] tR t^OtRtR# )(test_assert_deallocated_nodel.<locals>.Cr   N)r,   r-   r.   r/   r0   r   r   r   r4   r:   O   s    r   r4   Npytestraisesr   r   )r4   _s     r   test_assert_deallocated_nodelr?   M   sO     	~	&	&  ""a # 
'	& #" 
'	&	&#   A(A	A(A% A((A9	c            	           ! R  R4      p \         P                  ! \        4      ;_uu_ 4        \        V 4      ;_uu_ 4       p?RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)c                   &   a  ] tR t^]t o R tRtV tR# )+test_assert_deallocated_circular.<locals>.Cc                    W n         R # r   	_circularr%   s   &r   r(   4test_assert_deallocated_circular.<locals>.C.__init__^       !Nr   rE   Nr+   r2   s   @r   r4   rC   ]        	" 	"r   r4   Nr;   )r4   r6   s     r    test_assert_deallocated_circularrK   [   sM    " " 
~	&	&""a # 
'	&"" 
'	&	&s#   A(A	A(A% A((A9	c            	           ! R  R4      p \         P                  ! \        4      ;_uu_ 4        \        V 4      ;_uu_ 4         RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)c                   &   a  ] tR t^ht o R tRtV tR# ),test_assert_deallocated_circular2.<locals>.Cc                    W n         R # r   rE   rG   s   &r   r(   5test_assert_deallocated_circular2.<locals>.C.__init__i   rI   r   rE   Nr+   r2   s   @r   r4   rN   h   rJ   r   r4   Nr;   )r4   s    r   !test_assert_deallocated_circular2rQ   f   sK    " " 
~	&	&"" # 
'	&"" 
'	&	&r@   )__doc__r   	threadingr   scipy._lib._gcutilsr   r   r   r   r   numpy.testingr	   r<   fixturer   r   r   markskipifr7   r?   rK   rQ   r   r   r   <module>rY      s    	 : : '    . G$AB9 C9$ G$AB
 C
 G$AB C G$AB Cr   