@@ -40,7 +40,13 @@ def get_abi3_suffix():
40
40
ABI3SUFFIX = get_abi3_suffix ()
41
41
42
42
43
- def test_wheel_tag ():
43
+ @pytest .fixture ()
44
+ def cleanenv (monkeypatch ):
45
+ # $MACOSX_DEPLOYMENT_TARGET affects the computation of the platform tag on macOS.
46
+ monkeypatch .delenv ('MACOSX_DEPLOYMENT_TARGET' , raising = False )
47
+
48
+
49
+ def test_wheel_tag (cleanenv ):
44
50
assert str (mesonpy ._tags .Tag ()) == f'{ INTERPRETER } -{ ABI } -{ PLATFORM } '
45
51
assert str (mesonpy ._tags .Tag (abi = 'abi3' )) == f'{ INTERPRETER } -abi3-{ PLATFORM } '
46
52
@@ -112,14 +118,14 @@ def test_tag_purelib_wheel():
112
118
assert str (builder .tag ) == 'py3-none-any'
113
119
114
120
115
- def test_tag_platlib_wheel ():
121
+ def test_tag_platlib_wheel (cleanenv ):
116
122
builder = wheel_builder_test_factory ({
117
123
'platlib' : [f'extension{ SUFFIX } ' ],
118
124
})
119
125
assert str (builder .tag ) == f'{ INTERPRETER } -{ ABI } -{ PLATFORM } '
120
126
121
127
122
- def test_tag_stable_abi ():
128
+ def test_tag_stable_abi (cleanenv ):
123
129
builder = wheel_builder_test_factory ({
124
130
'platlib' : [f'extension{ ABI3SUFFIX } ' ],
125
131
}, limited_api = True )
@@ -130,7 +136,7 @@ def test_tag_stable_abi():
130
136
131
137
@pytest .mark .xfail (sys .version_info < (3 , 8 ) and sys .platform == 'win32' , reason = 'Extension modules suffix without ABI tags' )
132
138
@pytest .mark .xfail ('__pypy__' in sys .builtin_module_names , reason = 'PyPy does not support the stable ABI' )
133
- def test_tag_mixed_abi ():
139
+ def test_tag_mixed_abi (cleanenv ):
134
140
builder = wheel_builder_test_factory ({
135
141
'platlib' : [f'extension{ ABI3SUFFIX } ' , f'another{ SUFFIX } ' ],
136
142
}, pure = False , limited_api = True )
0 commit comments