Skip to content

Commit daf454b

Browse files
committed
Mark build dir tests as passing for new resolver
The new resolver uses UUID to allow parallel build directories, so this error will no longer occur.
1 parent 09a7f27 commit daf454b

File tree

2 files changed

+31
-12
lines changed

2 files changed

+31
-12
lines changed

tests/functional/test_install_cleanup.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ def test_no_clean_option_blocks_cleaning_after_install(script, data):
2020

2121

2222
@pytest.mark.network
23-
def test_cleanup_prevented_upon_build_dir_exception(script, data):
23+
def test_cleanup_prevented_upon_build_dir_exception(
24+
script,
25+
data,
26+
use_new_resolver,
27+
):
2428
"""
2529
Test no cleanup occurs after a PreviousBuildDirError
2630
"""
@@ -31,12 +35,14 @@ def test_cleanup_prevented_upon_build_dir_exception(script, data):
3135
result = script.pip(
3236
'install', '-f', data.find_links, '--no-index', 'simple',
3337
'--build', build,
34-
expect_error=True, expect_temp=True,
38+
expect_error=(not use_new_resolver),
39+
expect_temp=(not use_new_resolver),
3540
)
3641

37-
assert result.returncode == PREVIOUS_BUILD_DIR_ERROR, str(result)
38-
assert "pip can't proceed" in result.stderr, str(result)
39-
assert exists(build_simple), str(result)
42+
if not use_new_resolver:
43+
assert result.returncode == PREVIOUS_BUILD_DIR_ERROR, str(result)
44+
assert "pip can't proceed" in result.stderr, str(result)
45+
assert exists(build_simple), str(result)
4046

4147

4248
@pytest.mark.network

tests/functional/test_wheel.py

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,11 @@ def test_pip_wheel_fail(script, data):
191191
assert result.returncode != 0
192192

193193

194-
def test_no_clean_option_blocks_cleaning_after_wheel(script, data):
194+
def test_no_clean_option_blocks_cleaning_after_wheel(
195+
script,
196+
data,
197+
use_new_resolver,
198+
):
195199
"""
196200
Test --no-clean option blocks cleaning after wheel build
197201
"""
@@ -202,9 +206,11 @@ def test_no_clean_option_blocks_cleaning_after_wheel(script, data):
202206
'simple',
203207
expect_temp=True,
204208
)
205-
build = build / 'simple'
206-
assert exists(build), \
207-
"build/simple should still exist {result}".format(**locals())
209+
210+
if not use_new_resolver:
211+
build = build / 'simple'
212+
message = "build/simple should still exist {}".format(result)
213+
assert exists(build), message
208214

209215

210216
def test_pip_wheel_source_deps(script, data):
@@ -224,7 +230,11 @@ def test_pip_wheel_source_deps(script, data):
224230
assert "Successfully built source" in result.stdout, result.stdout
225231

226232

227-
def test_pip_wheel_fail_cause_of_previous_build_dir(script, data):
233+
def test_pip_wheel_fail_cause_of_previous_build_dir(
234+
script,
235+
data,
236+
use_new_resolver,
237+
):
228238
"""
229239
Test when 'pip wheel' tries to install a package that has a previous build
230240
directory
@@ -240,11 +250,14 @@ def test_pip_wheel_fail_cause_of_previous_build_dir(script, data):
240250
'wheel', '--no-index',
241251
'--find-links={data.find_links}'.format(**locals()),
242252
'--build', script.venv_path / 'build',
243-
'simple==3.0', expect_error=True, expect_temp=True,
253+
'simple==3.0',
254+
expect_error=(not use_new_resolver),
255+
expect_temp=(not use_new_resolver),
244256
)
245257

246258
# Then I see that the error code is the right one
247-
assert result.returncode == PREVIOUS_BUILD_DIR_ERROR, result
259+
if not use_new_resolver:
260+
assert result.returncode == PREVIOUS_BUILD_DIR_ERROR, result
248261

249262

250263
def test_wheel_package_with_latin1_setup(script, data):

0 commit comments

Comments
 (0)