Repository navigation
Commit 12dd62a
committed
Fix SnapshotTool annotation test hanging on its snapshot dialog
Since the fix of #58, SnapshotTool defers its action with a zero-delay
timer. In test_annotation_tools, this action ran during the
processEvents() call of guidata's exec_dialog, before the automatic
closing of dialogs was scheduled, so the modal ResizeDialog opened by
save_snapshot was never closed and the test hung. The test only passed
under PyQt5 on Linux when run after another test, whose pending closing
timer closed the dialog; it hung when run on its own, on Windows, and
with PyQt6 or PySide6.
In unattended mode, replace the snapshot action by a recorder, run the
deferred actions within the test, and check that the action was called
once with the plot and an oriented rectangle.
Assisted-by: Claude Opus 5.51 parent b62c67d commit 12dd62a
2 files changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
100 | 109 | | |
101 | 110 | | |
102 | 111 | | |
103 | 112 | | |
104 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
105 | 117 | | |
106 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
107 | 124 | | |
108 | 125 | | |
109 | 126 | | |
| |||
0 commit comments