@@ -44,23 +44,51 @@ def tearDown(self) -> None:
44
44
self .assertFalse (self .main_window .isVisible ())
45
45
46
46
def test_correlate (self ):
47
+ expected_initial_cor = 64.0
48
+ expected_initial_tilt = 0.0
49
+ expected_final_cor = 66.0
50
+ expected_final_tilt = 1.070368
51
+
52
+ self .assertEqual (self .recon_window .rotation_centre , expected_initial_cor )
53
+ self .assertEqual (self .recon_window .tilt , expected_initial_tilt )
54
+
47
55
for _ in range (5 ):
48
56
QTest .mouseClick (self .recon_window .correlateBtn , Qt .MouseButton .LeftButton )
49
57
QTest .qWait (SHORT_DELAY )
50
58
wait_until (lambda : self .recon_window .correlateBtn .isEnabled ())
51
59
wait_until (lambda : len (self .recon_window .presenter .async_tracker ) == 0 )
52
60
61
+ final_cor_value = self .recon_window .rotation_centre
62
+ final_tilt_value = self .recon_window .tilt
63
+
64
+ self .assertEqual (final_cor_value , expected_final_cor )
65
+ self .assertEqual (final_tilt_value , expected_final_tilt )
66
+
53
67
@pytest .mark .xfail (reason = "Unresolved, see #1641" )
54
68
def test_minimise (self ):
69
+ expected_cor = 64.0
70
+ expected_tilt = 0.0
71
+
72
+ initial_cor = self .recon_window .rotation_centre
73
+ initial_tilt = self .recon_window .tilt
74
+
55
75
for i in range (2 , 6 ):
56
76
QTimer .singleShot (SHORT_DELAY , lambda i = i : self ._click_InputDialog (set_int = i ))
57
77
QTest .mouseClick (self .recon_window .minimiseBtn , Qt .MouseButton .LeftButton )
58
-
59
78
QTest .qWait (SHORT_DELAY )
60
79
wait_until (lambda : self .recon_window .minimiseBtn .isEnabled (), max_retry = 500 )
61
80
wait_until (lambda : len (self .recon_window .presenter .async_tracker ) == 0 )
62
81
QTest .qWait (SHORT_DELAY )
63
82
83
+ final_cor_value = self .recon_window .rotation_centre
84
+ final_tilt_value = self .recon_window .tilt
85
+
86
+ self .assertEqual (initial_cor , expected_cor )
87
+ self .assertEqual (initial_tilt , expected_tilt )
88
+
89
+ self .assertEqual (final_cor_value , expected_cor )
90
+ self .assertEqual (final_tilt_value , expected_tilt )
91
+
64
92
@classmethod
65
93
def _click_cor_inspect (cls ):
66
94
"""
0 commit comments