1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
import pathlib
import subprocess
import pytest
HERE = pathlib.Path(__file__).parent.resolve()
@pytest.mark.parametrize("mode", ["repair", "addtag", "show"])
def test_non_platform_wheel_repair(mode):
wheel = HERE / "plumbum-1.6.8-py2.py3-none-any.whl"
proc = subprocess.run(
["auditwheel", mode, str(wheel)],
stderr=subprocess.PIPE,
universal_newlines=True,
)
assert proc.returncode == 1
assert "This does not look like a platform wheel" in proc.stderr
assert "AttributeError" not in proc.stderr
|