HOME


sh-3ll 1.0
DIR:/usr/local/lib64/python3.6/site-packages/numpy/tests/__pycache__/
Upload File :
Current File : //usr/local/lib64/python3.6/site-packages/numpy/tests/__pycache__/test_reloading.cpython-36.pyc
3

���h��@s`ddlmZmZmZddlmZddlZddlZddlZddl	m
Z
dd�Zdd�Zd	d
�Z
dS)�)�
assert_raises�assert_�assert_equal)�pickleN)�reloadcCs�ddl}ddl}|j}|j}|j}t|�t||jk�t||jk�t||jk�ttt|j	�t|�t||jk�t||jk�t||jk�dS)Nr)
�numpyZnumpy._globals�_NoValue�VisibleDeprecationWarning�ModuleDeprecationWarningrrr�RuntimeErrorZ_globals)�nprrr	r
�r
�;/tmp/pip-build-5_djhm0z/numpy/numpy/tests/test_reloading.py�test_numpy_reloading
srcCsVddl}xHtdtjd�D]4}tt|j�d�ttjtj	|j|d��|jk�qWdS)Nr��z
<no value>)�protocol)
r�ranger�HIGHEST_PROTOCOLr�reprrr�loads�dumps)r�protor
r
r�test_novalues
rcCs.tjd�}tjtjd|g�}|jdks*t�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.
    z�
        import sys
        import numpy as np

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

        import numpy as np
        z-crN)�textwrap�dedent�
subprocess�run�sys�
executable�
returncode�AssertionError)�code�pr
r
r�test_full_reimport&s	r$)Z
numpy.testingrrrZnumpy.compatrrrr�	importlibrrrr$r
r
r
r�<module>s