Allow step size any for number selector in slider mode (#105978)

This commit is contained in:
Erik Montnemery 2023-12-18 15:30:59 +01:00 committed by GitHub
parent b671de8942
commit 2515e520c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 9 deletions

View file

@ -396,6 +396,7 @@ def test_assist_pipeline_selector_schema(
({"min": 10, "max": 1000, "mode": "slider", "step": 0.5}, (), ()),
({"mode": "box"}, (10,), ()),
({"mode": "box", "step": "any"}, (), ()),
({"mode": "slider", "min": 0, "max": 1, "step": "any"}, (), ()),
),
)
def test_number_selector_schema(schema, valid_selections, invalid_selections) -> None:
@ -408,12 +409,6 @@ def test_number_selector_schema(schema, valid_selections, invalid_selections) ->
(
{}, # Must have mandatory fields
{"mode": "slider"}, # Must have min+max in slider mode
{
"mode": "slider",
"min": 0,
"max": 1,
"step": "any", # Can't combine slider with step any
},
),
)
def test_number_selector_schema_error(schema) -> None: