File: //lib/python3/dist-packages/numpy/tests/__pycache__/test_reloading.cpython-310.pyc
o
��c� � @ sz d dl mZmZmZmZ d dlmZ d dlZd dlZd dl Z d dl
mZ d dlZdd� Z
dd� Zejjd d
�dd� �ZdS )
� )�
assert_raises�assert_warns�assert_�assert_equal)�pickleN)�reloadc C s� dd l } dd l}| j}| j}| j}tt�� t| � W d � n1 s$w Y t|| ju � t|| ju � t|| ju � t t
t|j� tt�� t| � W d � n1 sXw Y t|| ju � t|| ju � t|| ju � d S )Nr )�numpy�numpy._globals�_NoValue�VisibleDeprecationWarning�ModuleDeprecationWarningr �UserWarningr r r �RuntimeError�_globals)�npr r
r r � r �</usr/lib/python3/dist-packages/numpy/tests/test_reloading.py�test_numpy_reloading s$
�
�r c C sR dd l } tdtjd �D ]}tt| j�d� tt�tj | j|d��| ju � qd S )Nr � � z
<no value>)�protocol)
r �ranger �HIGHEST_PROTOCOLr �reprr
r �loads�dumps)r �protor r r �test_novalue! s ���r zQDebian: disabled it runs in a separate process, picking up the system-wide module)�reasonc C s t �d�} t�tjd| g�}dS )z�At 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-cN)�textwrap�dedent�
subprocess�run�sys�
executable)�code�pr r r �test_full_reimport) s
r'