Live changes from early July, PX-III
Build and Publish / test (pull_request_target) Successful in 2m59s
Build and Publish / build (pull_request_target) Successful in 19s
Build and Publish / Build and Deploy Docs (pull_request_target) Successful in 35s

This commit was merged in pull request #111.
This commit is contained in:
David Perl
2026-07-27 10:33:04 +02:00
committed by perl_d
parent aae4ea7a32
commit df3ddc5c84
19 changed files with 112 additions and 219 deletions
-49
View File
@@ -1,49 +0,0 @@
# import sys
# from unittest.mock import MagicMock, patch
#
# from aarecommon.models.beamline import MXBeamline
# from aare.gui.gui import main
#
#
# @patch("aare.gui.gui.sys.exit")
# @patch("aare.gui.gui.cfg_get")
# @patch("aare.gui.gui.mx_beamline")
# @patch("aare.gui.gui.auth")
# @patch("aare.gui.gui.MainWindow")
# @patch("aare.gui.gui.LoadingSplashScreen")
# @patch("aare.gui.gui.QtGui.QPixmap")
# @patch("aare.gui.gui.QtGui.QIcon")
# @patch("aare.gui.gui.QApplication")
# def test_gui_main_startup(
# mock_app,
# mock_qicon,
# mock_qpixmap,
# mock_splash_cls,
# mock_main_window,
# mock_auth,
# mock_mx_beamline,
# mock_cfg_get,
# mock_sys_exit,
# ):
# mock_mx_beamline.return_value = MXBeamline.X06DA
# mock_auth.return_value = "header.payload.signature"
# mock_cfg_get.side_effect = lambda key, default=None: default
#
# mock_app_instance = mock_app.return_value
# mock_app_instance.exec.return_value = 0
#
# mock_splash = mock_splash_cls.return_value
# mock_window = mock_main_window.return_value
#
# with patch.object(sys, "argv", ["gui.py"]):
# main()
#
# mock_app.assert_called_once_with(["gui.py"])
# mock_auth.assert_called_once()
# mock_main_window.assert_called_once()
# mock_window.show.assert_called_once()
#
# mock_splash.show.assert_called_once()
# mock_splash.finish.assert_called_once_with(mock_window)
#
# mock_sys_exit.assert_called_once_with(0)
+3 -2
View File
@@ -7,6 +7,7 @@ from aare.gui.widgets.message_box import (
experiment_hutch_shutter_check,
ring_current_auto_check,
)
import pytest
def test_reply_box(qtbot):
@@ -30,10 +31,10 @@ def test_timer_box_auto_accept(qtbot):
assert box.result() == QMessageBox.StandardButton.Yes
@pytest.mark.timeout(10)
def test_ring_current_low_check_ok(qtbot):
# Should return True immediately if current is high enough
assert ring_current_low_check(None, 200.0) is True
assert ring_current_low_check(None, 361.0) is True
def test_ring_current_low_check_low_yes(qtbot):