@@ -324,15 +324,15 @@ def test_pulse_lights_success(self, mock_effects, mock_get_selection):
324
324
mock_selection = Mock ()
325
325
mock_get_selection .return_value = mock_selection
326
326
327
- pulse_lights (mock_ctx , color = (0 , 255 , 0 ), speed = Speed .Medium , count = 3 )
327
+ pulse_lights (mock_ctx , color = (0 , 255 , 0 ), speed = Speed .Medium , count = 3 , led = 0 )
328
328
329
329
mock_effects .for_name .assert_called_once_with ("gradient" )
330
330
mock_effects .for_name .return_value .assert_called_once_with (
331
331
(0 , 255 , 0 ), step = 8 , count = 3
332
332
)
333
333
334
334
mock_selection .apply_effect .assert_called_once_with (
335
- mock_effect_instance , duration = 30.0 , interval = Speed .Medium .duty_cycle / 16
335
+ mock_effect_instance , duration = 30.0 , interval = Speed .Medium .duty_cycle / 16 , led = 0
336
336
)
337
337
338
338
@patch ("busylight.subcommands.pulse.get_light_selection" )
@@ -350,7 +350,7 @@ def test_pulse_lights_timeout_error(self, mock_effects, mock_get_selection):
350
350
mock_selection .apply_effect .side_effect = TimeoutError ()
351
351
mock_get_selection .return_value = mock_selection
352
352
353
- pulse_lights (mock_ctx , color = (0 , 0 , 255 ), speed = Speed .Fast , count = 0 )
353
+ pulse_lights (mock_ctx , color = (0 , 0 , 255 ), speed = Speed .Fast , count = 0 , led = 0 )
354
354
355
355
mock_selection .turn_off .assert_called_once ()
356
356
@@ -366,7 +366,7 @@ def test_pulse_lights_no_lights_found(self, mock_get_selection):
366
366
367
367
with patch ("busylight.subcommands.pulse.typer.secho" ) as mock_secho :
368
368
with pytest .raises (typer .Exit ) as exc_info :
369
- pulse_lights (mock_ctx , color = (128 , 128 , 128 ), speed = Speed .Slow , count = 2 )
369
+ pulse_lights (mock_ctx , color = (128 , 128 , 128 ), speed = Speed .Slow , count = 2 , led = 0 )
370
370
371
371
assert exc_info .value .exit_code == 1
372
372
mock_secho .assert_called_with ("Unable to pulse lights." , fg = "red" )
@@ -387,7 +387,7 @@ def test_pulse_lights_generic_exception(self, mock_effects, mock_get_selection):
387
387
388
388
with patch ("busylight.subcommands.pulse.typer.secho" ) as mock_secho :
389
389
with pytest .raises (typer .Exit ) as exc_info :
390
- pulse_lights (mock_ctx , color = (64 , 64 , 64 ), speed = Speed .Medium , count = 1 )
390
+ pulse_lights (mock_ctx , color = (64 , 64 , 64 ), speed = Speed .Medium , count = 1 , led = 0 )
391
391
392
392
assert exc_info .value .exit_code == 1
393
393
mock_secho .assert_called_with ("Error pulse lights: Pulse test error" , fg = "red" )
0 commit comments