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:
|
items:
|
||||||
type: object
|
type: object
|
||||||
required: ["select"]
|
required: ["select"]
|
||||||
|
minProperties: 2
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
select: {}
|
select: {}
|
||||||
|
|||||||
@@ -406,6 +406,7 @@
|
|||||||
"required": [
|
"required": [
|
||||||
"select"
|
"select"
|
||||||
],
|
],
|
||||||
|
"minProperties": 2,
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"properties": {
|
"properties": {
|
||||||
"select": {
|
"select": {
|
||||||
|
|||||||
@@ -59,6 +59,19 @@ def test_overrides_no_select():
|
|||||||
validator(example)
|
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():
|
def test_docs_examples():
|
||||||
"""
|
"""
|
||||||
Parse out all the configuration examples, build valid TOML out of them, and
|
Parse out all the configuration examples, build valid TOML out of them, and
|
||||||
|
|||||||
Reference in New Issue
Block a user