style: narrow the log pop-out view for the pyright gate
CI / lint (push) Skipped
CI / test (3.11) (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / test-with-beamline-plugins (pxi_bec) (push) Skipped
CI / test-with-beamline-plugins (pxii_bec) (push) Skipped
CI / test-with-beamline-plugins (pxiii_bec) (push) Skipped
CI / test (3.11) (pull_request) Successful in 1m1s
CI / test (3.12) (pull_request) Successful in 1m0s
CI / test (3.13) (pull_request) Successful in 1m0s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m0s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m2s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m18s
CI / test-with-coverage (pull_request) Successful in 1m31s
CI / coverage-analysis (pull_request) Successful in 3s
CI / lint (pull_request) Successful in 2m29s

The Optional _popout_view is assert-narrowed once after opening; the
unguarded accesses were the last three diff-gate violations.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-07 17:52:30 +02:00
co-authored by Claude Fable 5
parent b4d680494b
commit 46aed87a4c
+5 -3
View File
@@ -13,11 +13,13 @@ def test_log_popout_mirrors_and_clears(qtbot):
dock._open_popout()
assert dock._popout is not None
assert dock._popout.isVisible()
popout_view = dock._popout_view
assert popout_view is not None
# History copied on open, live lines reach both views.
assert "first line" in dock._popout_view.toPlainText()
assert "first line" in popout_view.toPlainText()
dock.emitter.message.emit("second line")
assert "second line" in dock.view.toPlainText()
assert "second line" in dock._popout_view.toPlainText()
assert "second line" in popout_view.toPlainText()
# Reopening reuses the window instead of stacking mirrors.
popout = dock._popout
@@ -26,4 +28,4 @@ def test_log_popout_mirrors_and_clears(qtbot):
dock.clear()
assert dock.view.toPlainText() == ""
assert dock._popout_view.toPlainText() == ""
assert popout_view.toPlainText() == ""