fix: ensure 2+ items in each override in schema (#1628)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
@@ -200,6 +200,7 @@ description: An overrides array
|
||||
items:
|
||||
type: object
|
||||
required: ["select"]
|
||||
minProperties: 2
|
||||
additionalProperties: false
|
||||
properties:
|
||||
select: {}
|
||||
|
||||
@@ -406,6 +406,7 @@
|
||||
"required": [
|
||||
"select"
|
||||
],
|
||||
"minProperties": 2,
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"select": {
|
||||
|
||||
@@ -59,6 +59,19 @@ def test_overrides_no_select():
|
||||
validator(example)
|
||||
|
||||
|
||||
def test_overrides_only_select():
|
||||
example = tomllib.loads(
|
||||
"""
|
||||
[[tool.cibuildwheel.overrides]]
|
||||
select = "somestring"
|
||||
"""
|
||||
)
|
||||
|
||||
validator = validate_pyproject.api.Validator()
|
||||
with pytest.raises(validate_pyproject.error_reporting.ValidationError):
|
||||
validator(example)
|
||||
|
||||
|
||||
def test_docs_examples():
|
||||
"""
|
||||
Parse out all the configuration examples, build valid TOML out of them, and
|
||||
|
||||
Reference in New Issue
Block a user