mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-14 11:41:49 +02:00
fix: formatter and tests fixed
This commit is contained in:
@ -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 = {
|
||||
|
@ -172,7 +172,7 @@
|
||||
<customwidget>
|
||||
<class>BECTable</class>
|
||||
<extends>QTableWidget</extends>
|
||||
<header>bec_widgets.qt_utils.h</header>
|
||||
<header>bec_widgets.utils.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
|
@ -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:
|
||||
|
Reference in New Issue
Block a user