o c@szddlmZmZmZmZddlmZddlZddlZddl Z ddl m Z ddl Z ddZ ddZe jjd d d d ZdS) ) assert_raises assert_warnsassert_ assert_equal)pickleN)reloadcCsddl}ddl}|j}|j}|j}tt t|Wdn1s$wYt||jut||jut||jut t t|j tt t|Wdn1sXwYt||jut||jut||judS)Nr) numpynumpy._globals_NoValueVisibleDeprecationWarningModuleDeprecationWarningr UserWarningrrr RuntimeError_globals)nprr r r r)protocol) rrangerHIGHEST_PROTOCOLrreprr rloadsdumps)rprotorrr test_novalue!srzQDebian: disabled it runs in a separate process, picking up the system-wide module)reasoncCs td}ttjd|g}dS)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-cN)textwrapdedent subprocessrunsys executable)codeprrrtest_full_reimport)s  r') numpy.testingrrrr numpy.compatrr#r!r importlibrpytestrrmarkskipr'rrrrs