mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-03-21 18:00:37 +01:00
test: carry the step as argument for arg testing
Simplifies things a bit since it makes it all more explicit Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
a9f4fdde0e
commit
a328ada6ef
1 changed files with 3 additions and 5 deletions
|
|
@ -219,9 +219,9 @@ options = {
|
|||
"set-profile": ["adaptive", "flat"],
|
||||
"set-tap-map": ["lrm", "lmr"],
|
||||
},
|
||||
# options with a range
|
||||
# options with a range (and increment)
|
||||
"ranges": {
|
||||
"set-speed": (float, -1.0, +1.0),
|
||||
"set-speed": (-1.0, +1.0, 0.1),
|
||||
},
|
||||
}
|
||||
|
||||
|
|
@ -250,9 +250,7 @@ def test_options_enums(libinput_debug_tool, option):
|
|||
@pytest.mark.parametrize("option", options["ranges"].items())
|
||||
def test_options_ranges(libinput_debug_tool, option):
|
||||
name, values = option
|
||||
range_type, minimum, maximum = values
|
||||
assert range_type == float
|
||||
step = (maximum - minimum) / 10.0
|
||||
minimum, maximum, step = values
|
||||
value = minimum
|
||||
while value < maximum:
|
||||
libinput_debug_tool.run_command_success(["--{}".format(name), str(value)])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue