Skip to content

Commit 7669d84

Browse files
committed
Skip failing build_env tests on Azure MacOS
1 parent abb3d0f commit 7669d84

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

.azure-pipelines/macos.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
variables:
22
CI: true
3+
PIP_CI_MACOS_AZURE: true
34

45
jobs:
56
- template: jobs/test.yml

tests/functional/test_build_env.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
import pytest
44

55
from pip._internal.build_env import BuildEnvironment
6-
from tests.lib import create_basic_wheel_for_package, make_test_finder
6+
from tests.lib import (
7+
create_basic_wheel_for_package,
8+
make_test_finder,
9+
skip_if_azure_macos,
10+
)
711

812

913
def indent(text, prefix):
@@ -91,6 +95,7 @@ def test_build_env_allow_only_one_install(script):
9195
'installing in {prefix}'.format(**locals()))
9296

9397

98+
@skip_if_azure_macos
9499
def test_build_env_requirements_check(script):
95100

96101
create_basic_wheel_for_package(script, 'foo', '2.0')
@@ -149,6 +154,7 @@ def test_build_env_requirements_check(script):
149154
''')
150155

151156

157+
@skip_if_azure_macos
152158
def test_build_env_overlay_prefix_has_priority(script):
153159
create_basic_wheel_for_package(script, 'pkg', '2.0')
154160
create_basic_wheel_for_package(script, 'pkg', '4.3')
@@ -168,6 +174,7 @@ def test_build_env_overlay_prefix_has_priority(script):
168174
assert result.stdout.strip() == '2.0', str(result)
169175

170176

177+
@skip_if_azure_macos
171178
@pytest.mark.incompatible_with_test_venv
172179
def test_build_env_isolation(script):
173180

tests/lib/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,10 @@ def need_mercurial(fn):
11661166

11671167
skip_if_python2 = pytest.mark.skipif(PY2, reason="Non-Python 2 only")
11681168
skip_if_not_python2 = pytest.mark.skipif(not PY2, reason="Python 2 only")
1169+
skip_if_azure_macos = pytest.mark.skipif(
1170+
"PIP_CI_MACOS_AZURE" in os.environ,
1171+
reason="MacOS on Azure Pipelines generates wrong temporary files"
1172+
)
11691173

11701174

11711175
# Workaround for test failures after new wheel release.

0 commit comments

Comments
 (0)