summaryrefslogtreecommitdiff
path: root/setuptools/tests
diff options
context:
space:
mode:
authorBenoit Pierre <benoit.pierre@gmail.com>2019-11-25 11:24:10 +0100
committerBenoit Pierre <benoit.pierre@gmail.com>2019-11-25 11:39:11 +0100
commit926c80f5e84823f48103f3695f55f23949cc5d37 (patch)
treeea515585d307bad32323f6c34cac91105b1ef37c /setuptools/tests
parentd155aa0d61690b7013de968b912a001d18f5cfdd (diff)
downloadpython-setuptools-git-926c80f5e84823f48103f3695f55f23949cc5d37.tar.gz
wheel: fix `is_compatible` implementation
Diffstat (limited to 'setuptools/tests')
-rw-r--r--setuptools/tests/test_wheel.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/setuptools/tests/test_wheel.py b/setuptools/tests/test_wheel.py
index d50816c2..55d346c6 100644
--- a/setuptools/tests/test_wheel.py
+++ b/setuptools/tests/test_wheel.py
@@ -18,6 +18,7 @@ import pytest
from pkg_resources import Distribution, PathMetadata, PY_MAJOR
from setuptools.extern.packaging.utils import canonicalize_name
+from setuptools.extern.packaging.tags import parse_tag
from setuptools.wheel import Wheel
from .contexts import tempdir
@@ -571,3 +572,11 @@ def test_wheel_no_dist_dir():
_check_wheel_install(wheel_path, install_dir, None,
project_name,
version, None)
+
+
+def test_wheel_is_compatible(monkeypatch):
+ def sys_tags():
+ for t in parse_tag('cp36-cp36m-manylinux1_x86_64'):
+ yield t
+ monkeypatch.setattr('setuptools.wheel.sys_tags', sys_tags)
+ assert Wheel('onnxruntime-0.1.2-cp36-cp36m-manylinux1_x86_64.whl').is_compatible()