File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,14 @@ def test_get_by_priority(self):
55
55
def test_get_by_priority_missing (self ):
56
56
assert get_policy_name (101 ) is None
57
57
58
+ @patch ("auditwheel.policy._POLICIES" , [
59
+ {"name" : "duplicate" , "priority" : 0 },
60
+ {"name" : "duplicate" , "priority" : 0 },
61
+ ])
62
+ def test_get_by_priority_duplicate (self ):
63
+ with pytest .raises (RuntimeError ):
64
+ get_policy_name (0 )
65
+
58
66
def test_get_by_name (self ):
59
67
_arch = get_arch_name ()
60
68
assert get_priority_by_name (f"manylinux2014_{ _arch } " ) == 80
@@ -65,3 +73,11 @@ def test_get_by_name(self):
65
73
def test_get_by_name_missing (self ):
66
74
assert get_priority_by_name ("nosuchpolicy" ) is None
67
75
76
+ @patch ("auditwheel.policy._POLICIES" , [
77
+ {"name" : "duplicate" , "priority" : 0 },
78
+ {"name" : "duplicate" , "priority" : 0 },
79
+ ])
80
+ def test_get_by_name_duplicate (self ):
81
+ with pytest .raises (RuntimeError ):
82
+ get_priority_by_name ("duplicate" )
83
+
You can’t perform that action at this time.
0 commit comments