feat: Print FatalError messages using Logger (#2292)
* feat: Print FatalError messages using Logger This makes them appear GHA annotations in CI logs, which makes them easier to spot. I've also added the "cibuildwheel: " prefix to those errors, I think it helps when viewing a log to know which tool is talking to you - it can be difficult to understand with build tools. * Nicer error message on invalid architecture * Fix some message formatting and test expectations
This commit is contained in:
@@ -41,7 +41,7 @@ def test_unknown_platform_on_ci(monkeypatch, capsys):
|
||||
assert exit.value.code == 2
|
||||
_, err = capsys.readouterr()
|
||||
|
||||
assert 'cibuildwheel: Unable to detect platform from "sys.platform"' in err
|
||||
assert 'Unable to detect platform from "sys.platform"' in err
|
||||
|
||||
|
||||
def test_unknown_platform(monkeypatch, capsys):
|
||||
@@ -52,7 +52,7 @@ def test_unknown_platform(monkeypatch, capsys):
|
||||
_, err = capsys.readouterr()
|
||||
|
||||
assert exit.value.code == 2
|
||||
assert "cibuildwheel: Unsupported platform: nonexistent" in err
|
||||
assert "Unsupported platform: nonexistent" in err
|
||||
|
||||
|
||||
def test_platform_argument(platform, intercepted_build_args, monkeypatch):
|
||||
@@ -276,4 +276,4 @@ def test_pyodide_on_windows(monkeypatch, capsys):
|
||||
_, err = capsys.readouterr()
|
||||
|
||||
assert exit.value.code == 2
|
||||
assert "cibuildwheel: Building for pyodide is not supported on Windows" in err
|
||||
assert "Building for pyodide is not supported on Windows" in err
|
||||
|
||||
Reference in New Issue
Block a user