Merge main into fzp-move-beyond: FZP how-tos keep the branch version (rewritten 2026-10-23: move-beyond, loop settings, scan modes; supersedes the 2026-10-20 update on main)
CI for csaxs_bec / test (pull_request) Successful in 4m42s
Read the Docs Deploy Trigger / trigger-rtd-webhook (push) Successful in 2s
CI for csaxs_bec / test (push) Successful in 4m30s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QnSJvqxh9oDbshx8qXgeiX
This commit was merged in pull request #338.
This commit is contained in:
Mirko HollerandClaude Opus 5.5 committed 2026-10-26 13:05:49 +01:00
commit 98abc5a1ca
1 file changed
+17
@@ -27,6 +27,22 @@ def _qapp():
return pg.mkQApp()
# All test ROIs go into one scene that lives for the whole module: Qt then owns the items, and the
# Python garbage collector cannot delete an unparented ROI while the next one is being built (that
# crashed PySide6 / pyqtgraph in CI with --random-order: "Fatal Python error: Segmentation fault" in
# GraphicsObject.itemChange during garbage collection).
_SCENE = None
@pytest.fixture(autouse=True, scope="module")
def _scene(_qapp):
global _SCENE
_SCENE = pg.QtWidgets.QGraphicsScene()
yield _SCENE
_SCENE.clear()
_SCENE = None
class _FakeEllipticalROI(pg.EllipseROI):
"""pg ellipse standing in for bec_widgets' EllipticalROI in isinstance checks."""
@@ -39,6 +55,7 @@ def _patch_roi_class():
def _roi(pos=(10.0, 20.0), size=(40.0, 20.0), angle=0.0):
roi = _FakeEllipticalROI(pos, size, angle=angle)
_SCENE.addItem(roi)
return roi