diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2020-02-11 11:53:05 -0800 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2020-02-11 11:53:05 -0800 |
commit | 2daa33cdcdee0d9ab78c0a4940453b350e863bf0 (patch) | |
tree | ac10879b0a40be53015ede2b0fc12fbddd78d3e6 | |
parent | 6e6ed6b9298279b2c026795d3fa5e592ca6adcf0 (diff) | |
download | psutil-2daa33cdcdee0d9ab78c0a4940453b350e863bf0.tar.gz |
copyload_shaRED_LIB HACK TO SUPPORT pypy
-rw-r--r-- | psutil/tests/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/psutil/tests/__init__.py b/psutil/tests/__init__.py index 8a373386..2ad28738 100644 --- a/psutil/tests/__init__.py +++ b/psutil/tests/__init__.py @@ -1111,9 +1111,12 @@ else: ext = ".dll" dst = tempfile.mktemp(prefix=dst_prefix, suffix=ext) libs = [x.path for x in psutil.Process().memory_maps() if - os.path.splitext(x.path)[1].lower() == ext and + x.path.lower().endswith(ext) and 'python' in os.path.basename(x.path).lower() and 'wow64' not in x.path.lower()] + if PYPY and not libs: + libs = [x.path for x in psutil.Process().memory_maps() if + 'pypy' in os.path.basename(x.path).lower()] src = random.choice(libs) shutil.copyfile(src, dst) cfile = None |