fix(signal_proxy): make cleanup_signal_proxy idempotent

This commit is contained in:
wyzula_j authored and Jan Wyzula committed 2026-10-17 18:31:49 +02:00
1 parent af2c748127
commit 4c4e5febd8
2 files changed
+9 -1

No files matched your search

@@ -1,3 +1,4 @@
import warnings
from unittest import mock
import pyqtgraph as pg
@@ -256,4 +257,7 @@ def test_cleanup_signal_proxy_stops_queued_delivery(qtbot):
assert calls == []
assert ticks == []
assert not proxy.timer.timer.isActive()
cleanup_signal_proxy(proxy) # a second call is a no-op
with warnings.catch_warnings(record=True) as caught:
warnings.simplefilter("always")
cleanup_signal_proxy(proxy) # a second call is a no-op, without PySide warnings
assert [str(w.message) for w in caught] == []