Skip to content

Commit d7cecd3

Browse files
committed
Fix ruff format
1 parent e0c15c7 commit d7cecd3

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

src/genie_python/genie_dae.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ def simulation_mode_warning(self) -> None:
403403
print("Simulation mode can be stopped using: \n")
404404
print(" >>>set_dae_simulation_mode(False) \n")
405405
print("==================================================\n")
406-
406+
407407
def test_clock_warning(self) -> None:
408408
"""
409409
Warn user they are using the test clock.

tests/test_genie_dae.py

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,9 @@ def test_WHEN_clearing_all_vetoes_THEN_fifo_is_unaffected(self):
430430
func.assert_not_called()
431431

432432
@patch("genie_python.genie_cachannel_wrapper.CaChannelWrapper.add_monitor")
433-
def test_GIVEN_simulation_mode_AND_test_clock_WHEN_begin_run_THEN_user_is_warned(self, mock_monitor):
433+
def test_GIVEN_simulation_mode_AND_test_clock_WHEN_begin_run_THEN_user_is_warned(
434+
self, mock_monitor
435+
):
434436
mock_monitor.return_value = None
435437
self.dae.api.get_pv_value = MagicMock(return_value="SETUP")
436438
self.dae.get_simulation_mode = MagicMock(return_value=True)
@@ -439,14 +441,16 @@ def test_GIVEN_simulation_mode_AND_test_clock_WHEN_begin_run_THEN_user_is_warned
439441
clock_mock_warning = MagicMock()
440442
self.dae.test_clock_warning = clock_mock_warning
441443
self.dae.simulation_mode_warning = sim_mock_warning
442-
444+
443445
self.dae.begin_run()
444446

445447
sim_mock_warning.assert_called_once()
446448
clock_mock_warning.assert_not_called()
447449

448450
@patch("genie_python.genie_cachannel_wrapper.CaChannelWrapper.add_monitor")
449-
def test_GIVEN_in_test_clock_AND_not_in_simulation_mode_WHEN_begin_run_THEN_user_is_warned(self, mock_monitor):
451+
def test_GIVEN_in_test_clock_AND_not_in_simulation_mode_WHEN_begin_run_THEN_user_is_warned(
452+
self, mock_monitor
453+
):
450454
mock_monitor.return_value = None
451455
self.dae.api.get_pv_value = MagicMock(return_value="SETUP")
452456
self.dae.get_simulation_mode = MagicMock(return_value=False)
@@ -455,14 +459,16 @@ def test_GIVEN_in_test_clock_AND_not_in_simulation_mode_WHEN_begin_run_THEN_user
455459
clock_mock_warning = MagicMock()
456460
self.dae.test_clock_warning = clock_mock_warning
457461
self.dae.simulation_mode_warning = sim_mock_warning
458-
462+
459463
self.dae.begin_run()
460464

461465
sim_mock_warning.assert_not_called()
462466
clock_mock_warning.assert_called_once()
463-
467+
464468
@patch("genie_python.genie_cachannel_wrapper.CaChannelWrapper.add_monitor")
465-
def test_GIVEN_simulation_mode_AND_not_test_clock_WHEN_begin_run_THEN_user_is_warned(self, mock_monitor):
469+
def test_GIVEN_simulation_mode_AND_not_test_clock_WHEN_begin_run_THEN_user_is_warned(
470+
self, mock_monitor
471+
):
466472
mock_monitor.return_value = None
467473
self.dae.api.get_pv_value = MagicMock(return_value="SETUP")
468474
self.dae.get_simulation_mode = MagicMock(return_value=True)
@@ -471,14 +477,16 @@ def test_GIVEN_simulation_mode_AND_not_test_clock_WHEN_begin_run_THEN_user_is_wa
471477
clock_mock_warning = MagicMock()
472478
self.dae.test_clock_warning = clock_mock_warning
473479
self.dae.simulation_mode_warning = sim_mock_warning
474-
480+
475481
self.dae.begin_run()
476482

477483
sim_mock_warning.assert_called_once()
478484
clock_mock_warning.assert_not_called()
479485

480486
@patch("genie_python.genie_cachannel_wrapper.CaChannelWrapper.add_monitor")
481-
def test_GIVEN_not_in_test_clock_not_in_simulation_mode_WHEN_begin_run_THEN_user_is_warned(self, mock_monitor):
487+
def test_GIVEN_not_in_test_clock_not_in_simulation_mode_WHEN_begin_run_THEN_user_is_warned(
488+
self, mock_monitor
489+
):
482490
mock_monitor.return_value = None
483491
self.dae.api.get_pv_value = MagicMock(return_value="SETUP")
484492
self.dae.get_simulation_mode = MagicMock(return_value=False)
@@ -487,7 +495,7 @@ def test_GIVEN_not_in_test_clock_not_in_simulation_mode_WHEN_begin_run_THEN_user
487495
clock_mock_warning = MagicMock()
488496
self.dae.test_clock_warning = clock_mock_warning
489497
self.dae.simulation_mode_warning = sim_mock_warning
490-
498+
491499
self.dae.begin_run()
492500

493501
sim_mock_warning.assert_not_called()

0 commit comments

Comments
 (0)