@@ -44,14 +44,29 @@ def tearDown(self) -> None:
44
44
self .assertFalse (self .main_window .isVisible ())
45
45
46
46
def test_correlate (self ):
47
+ expected_initial_cor = self .recon_window .presenter .model .last_cor .value
48
+ expected_initial_tilt = self .recon_window .presenter .model .auto_find_correlation (progress = None )[1 ].value
49
+
47
50
for _ in range (5 ):
48
51
QTest .mouseClick (self .recon_window .correlateBtn , Qt .MouseButton .LeftButton )
49
52
QTest .qWait (SHORT_DELAY )
53
+
50
54
wait_until (lambda : self .recon_window .correlateBtn .isEnabled ())
51
55
wait_until (lambda : len (self .recon_window .presenter .async_tracker ) == 0 )
52
56
57
+ final_cor_value = self .recon_window .presenter .model .last_cor .value
58
+ final_tilt_value = self .recon_window .presenter .model .auto_find_correlation (progress = None )[1 ].value
59
+
60
+ if final_cor_value != expected_initial_cor :
61
+ assert final_cor_value != expected_initial_cor
62
+
63
+ assert final_tilt_value == expected_initial_tilt
64
+
53
65
@pytest .mark .xfail (reason = "Unresolved, see #1641" )
54
66
def test_minimise (self ):
67
+ expected_initial_cor = self .recon_window .presenter .model .last_cor .value
68
+ expected_initial_tilt = self .recon_window .presenter .model .auto_find_correlation (progress = None )[1 ].value
69
+
55
70
for i in range (2 , 6 ):
56
71
QTimer .singleShot (SHORT_DELAY , lambda i = i : self ._click_InputDialog (set_int = i ))
57
72
QTest .mouseClick (self .recon_window .minimiseBtn , Qt .MouseButton .LeftButton )
@@ -61,6 +76,14 @@ def test_minimise(self):
61
76
wait_until (lambda : len (self .recon_window .presenter .async_tracker ) == 0 )
62
77
QTest .qWait (SHORT_DELAY )
63
78
79
+ final_cor_value = self .recon_window .presenter .model .last_cor .value
80
+ final_tilt_value = self .recon_window .presenter .model .auto_find_correlation (progress = None )[1 ].value
81
+
82
+ if final_cor_value != expected_initial_cor :
83
+ assert final_cor_value != expected_initial_cor
84
+
85
+ assert final_tilt_value == expected_initial_tilt
86
+
64
87
@classmethod
65
88
def _click_cor_inspect (cls ):
66
89
"""
0 commit comments