mirror of
https://github.com/bec-project/bec_widgets.git
synced 2026-10-31 00:31:28 +01:00
fix(signal_proxy): make cleanup_signal_proxy idempotent
This commit is contained in:
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] == []
|
||||
Reference in new issue
Block a user