Skip to content

Commit 2be9482

Browse files
committed
Add unit tests for auditwheel.policy.get_replace_platforms
1 parent e800f65 commit 2be9482

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/unit/test_policy.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
import pytest
44

5-
from auditwheel.policy import get_arch_name, get_policy_name, get_priority_by_name
5+
from auditwheel.policy import get_arch_name, get_policy_name, \
6+
get_priority_by_name, get_replace_platforms
67

78

89
@patch("auditwheel.policy._platform_module.machine")
@@ -32,6 +33,15 @@ def test_64bits_arch_name(machine_mock, reported_arch, expected_arch):
3233
assert machine == expected_arch
3334

3435

36+
@pytest.mark.parametrize("name,expected", [
37+
("linux_aarch64", []),
38+
("manylinux1_ppc64le", ["linux_ppc64le"]),
39+
("manylinux2014_x86_64", ["linux_x86_64"]),
40+
])
41+
def test_replacement_platform(name, expected):
42+
assert get_replace_platforms(name) == expected
43+
44+
3545
class TestPolicyAccess:
3646

3747
def test_get_by_priority(self):

0 commit comments

Comments
 (0)