fix: add suggestions to the TOML error message (#1205)
* fix: add suggestions to the TOML error message Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * Update cibuildwheel/options.py Co-authored-by: Matthieu Darbois <mayeut@users.noreply.github.com> Co-authored-by: Matthieu Darbois <mayeut@users.noreply.github.com>
This commit is contained in:
co-authored by
Matthieu Darbois
parent
9d170ac0f4
commit
c234ff5f36
@@ -160,9 +160,28 @@ repairs-wheel-command = "repair-project-linux"
|
||||
"""
|
||||
)
|
||||
|
||||
with pytest.raises(ConfigOptionError):
|
||||
with pytest.raises(ConfigOptionError) as excinfo:
|
||||
OptionsReader(pyproject_toml, platform="linux")
|
||||
|
||||
assert "repair-wheel-command" in str(excinfo.value)
|
||||
|
||||
|
||||
def test_underscores_in_key(tmp_path):
|
||||
# Note that platform contents are only checked when running
|
||||
# for that platform.
|
||||
pyproject_toml = tmp_path / "pyproject.toml"
|
||||
pyproject_toml.write_text(
|
||||
"""
|
||||
[tool.cibuildwheel]
|
||||
repair_wheel_command = "repair-project-linux"
|
||||
"""
|
||||
)
|
||||
|
||||
with pytest.raises(ConfigOptionError) as excinfo:
|
||||
OptionsReader(pyproject_toml, platform="linux")
|
||||
|
||||
assert "repair-wheel-command" in str(excinfo.value)
|
||||
|
||||
|
||||
def test_unexpected_table(tmp_path):
|
||||
pyproject_toml = tmp_path / "pyproject.toml"
|
||||
|
||||
Reference in New Issue
Block a user