B @`@s`ddlmZmZmZddlmZddlZddlZddlZddl m Z ddZ ddZ d d Z dS) ) assert_raisesassert_ assert_equal)pickleN)reloadcCsddl}ddl}|j}|j}|j}t|t||jkt||jkt||jkttt|j t|t||jkt||jkt||jkdS)Nr) numpyZnumpy._globals_NoValueVisibleDeprecationWarningModuleDeprecationWarningrrr RuntimeErrorZ_globals)nprrr r r >/tmp/pip-unpacked-wheel-ecq9wray/numpy/tests/test_reloading.pytest_numpy_reloading srcCsVddl}xHtdtjdD]4}tt|jdtttj |j|d|jkqWdS)Nrz )protocol) rrangerHIGHEST_PROTOCOLrreprrrloadsdumps)r protor r r test_novalues rcCs.td}ttjd|g}|jdks*tdS)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. 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)textwrapdedent subprocessrunsys executable returncodeAssertionError)codepr r rtest_full_reimport&s r$)Z numpy.testingrrrZ numpy.compatrrrr importlibrrrr$r r r rs