chore: move AlreadyBuiltWheelError & NonPlatformWheelError to errors.py (#1920)
This commit is contained in:
@@ -38,7 +38,7 @@ def test(tmp_path, capfd):
|
||||
else:
|
||||
expectation = does_not_raise()
|
||||
|
||||
with expectation:
|
||||
with expectation as exc_info:
|
||||
result = utils.cibuildwheel_run(
|
||||
project_dir,
|
||||
add_env={
|
||||
@@ -49,6 +49,7 @@ def test(tmp_path, capfd):
|
||||
captured = capfd.readouterr()
|
||||
if num_builds > 1:
|
||||
assert "Build failed because a wheel named" in captured.err
|
||||
assert exc_info.value.returncode == 6
|
||||
else:
|
||||
# We only produced one wheel (currently Pyodide)
|
||||
# check that it has the right name
|
||||
|
||||
@@ -31,10 +31,11 @@ def test(tmp_path, capfd):
|
||||
project_dir = tmp_path / "project"
|
||||
pure_python_project.generate(project_dir)
|
||||
|
||||
with pytest.raises(subprocess.CalledProcessError):
|
||||
with pytest.raises(subprocess.CalledProcessError) as exc_info:
|
||||
print("produced wheels:", utils.cibuildwheel_run(project_dir))
|
||||
|
||||
captured = capfd.readouterr()
|
||||
print("out", captured.out)
|
||||
print("err", captured.err)
|
||||
assert exc_info.value.returncode == 5
|
||||
assert "Build failed because a pure Python wheel was generated" in captured.err
|
||||
|
||||
Reference in New Issue
Block a user