From 186c42d6676a495bc2f66d8b7ed37dbf7d0be747 Mon Sep 17 00:00:00 2001
From: wyzula-jan <133381102+wyzula-jan@users.noreply.github.com>
Date: Tue, 12 Dec 2023 18:24:38 +0100
Subject: [PATCH] fix: formatter and tests fixed
---
bec_widgets/widgets/monitor/monitor.py | 1 +
bec_widgets/widgets/monitor/tab_template.ui | 2 +-
tests/test_plot_app.py | 8 ++++++--
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/bec_widgets/widgets/monitor/monitor.py b/bec_widgets/widgets/monitor/monitor.py
index 57666393..c61a476f 100644
--- a/bec_widgets/widgets/monitor/monitor.py
+++ b/bec_widgets/widgets/monitor/monitor.py
@@ -13,6 +13,7 @@ from qtpy.QtWidgets import QApplication, QMessageBox
from bec_widgets.utils import Colors, Crosshair
from bec_widgets.utils.yaml_dialog import load_yaml
from bec_widgets.validation import MonitorConfigValidator
+from bec_widgets.utils.bec_dispatcher import bec_dispatcher
# just for demonstration purposes if script run directly
CONFIG_SCAN_MODE = {
diff --git a/bec_widgets/widgets/monitor/tab_template.ui b/bec_widgets/widgets/monitor/tab_template.ui
index dbc0203e..757bf287 100644
--- a/bec_widgets/widgets/monitor/tab_template.ui
+++ b/bec_widgets/widgets/monitor/tab_template.ui
@@ -172,7 +172,7 @@
BECTable
QTableWidget
-
+
diff --git a/tests/test_plot_app.py b/tests/test_plot_app.py
index cff37fb0..74b1dcfc 100644
--- a/tests/test_plot_app.py
+++ b/tests/test_plot_app.py
@@ -424,7 +424,9 @@ def test_initialization(error_handler):
assert error_handler.retry_action is None
-@patch("bec_widgets.examples.plot_app.plot_app.QMessageBox.critical", return_value=QMessageBox.Retry)
+@patch(
+ "bec_widgets.examples.plot_app.plot_app.QMessageBox.critical", return_value=QMessageBox.Retry
+)
def test_handle_error_retry(mocked_critical, error_handler):
retry_action = MagicMock()
error_handler.set_retry_action(retry_action)
@@ -432,7 +434,9 @@ def test_handle_error_retry(mocked_critical, error_handler):
retry_action.assert_called_once()
-@patch("bec_widgets.examples.plot_app.plot_app.QMessageBox.critical", return_value=QMessageBox.Cancel)
+@patch(
+ "bec_widgets.examples.plot_app.plot_app.QMessageBox.critical", return_value=QMessageBox.Cancel
+)
def test_handle_error_cancel(mocked_critical, error_handler):
retry_action = MagicMock()
with pytest.raises(SystemExit) as excinfo: