diff options
Diffstat (limited to 'numpy/random/tests/test_extending.py')
-rw-r--r-- | numpy/random/tests/test_extending.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/random/tests/test_extending.py b/numpy/random/tests/test_extending.py index 99a819efb..d362092b5 100644 --- a/numpy/random/tests/test_extending.py +++ b/numpy/random/tests/test_extending.py @@ -5,6 +5,7 @@ import subprocess import sys import warnings import numpy as np +from numpy.distutils.misc_util import exec_mod_from_location try: import cffi @@ -75,10 +76,9 @@ def test_cython(tmp_path): assert so1 is not None assert so2 is not None # import the so's without adding the directory to sys.path - from importlib.machinery import ExtensionFileLoader - extending = ExtensionFileLoader('extending', so1).load_module() - extending_distributions = ExtensionFileLoader('extending_distributions', so2).load_module() - + exec_mod_from_location('extending', so1) + extending_distributions = exec_mod_from_location( + 'extending_distributions', so2) # actually test the cython c-extension from numpy.random import PCG64 values = extending_distributions.uniforms_ex(PCG64(0), 10, 'd') |