
    G/Ph?	                         d dl Z d dlZd dlZd dlmZ d dlZd dlZd dlmZ	 d dl
mZmZmZmZmZ d Zd Zej                            ed          d             ZdS )	    N)reload)assert_raisesassert_warnsassert_assert_equalIS_WASMc                     dd l } dd l}| j        }t          j        }t          j        }t          t                    5  t          |            d d d            n# 1 swxY w Y   t          || j        u            t          |t          j        u            t          |t          j        u            t          t          t          |j                   t          t                    5  t          |            d d d            n# 1 swxY w Y   t          || j        u            t          |t          j        u            t          |t          j        u            d S )Nr   )numpynumpy._globals_NoValueexVisibleDeprecationWarningModuleDeprecationWarningr   UserWarningr   r   r   RuntimeError_globals)npr
   r   r   r   s        Z/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/numpy/tests/test_reloading.pytest_numpy_reloadingr      s   {H " <!:	k	"	"  r


              H#$$$$(CCDDD%)EEFFF,777	k	"	"  r


              H#$$$$(CCDDD%)EEFFFFFs#   AAA#C??DDc            	         dd l } t          dt          j        dz             D ]e}t	          t          | j                  d           t          t          j        t          j	        | j        |                    | j        u            fd S )Nr         z
<no value>)protocol)
r
   rangepickleHIGHEST_PROTOCOLr   reprr   r   loadsdumps)r   protos     r   test_novaluer!   )   s    q&1A566 K KT"+&&555V\"+38: : : ; ;>@kJ 	K 	K 	K 	KK K    zcan't start subprocess)reasonc                      t          j        d          } t          j        t          j        d| gd          }|j        r1t          d|j        d|j        	                                           dS )zAt the time of writing this, it is *not* truly supported, but
    apparently enough users rely on it, for it to be an annoying change
    when it started failing previously.
    a  
        import sys
        from pytest import warns
        import numpy as np

        for k in list(sys.modules.keys()):
            if "numpy" in k:
                del sys.modules[k]

        with warns(UserWarning):
            import numpy as np
        z-cT)capture_outputzNon-zero return code: z

N)
textwrapdedent
subprocessrunsys
executable
returncodeAssertionErrorstderrdecode)codeps     r   test_full_reimportr2   1   s     ?   D 	d3DIIIA| 
LQ\LL9J9JLL
 
 	

 
r"   )r*   r(   r&   	importlibr   r   pytestnumpy.exceptions
exceptionsr   numpy.testingr   r   r   r   r   r   r!   markskipifr2    r"   r   <module>r;      s    



                                G G G,K K K G$<==
 
 >=
 
 
r"   