Closed heuer closed 1 month ago
The Listener.remove() method does not remove the listener from Signal._link. Only elements are added to Signal._link, but never removed.
Listener.remove()
Signal._link
The following should hold true:
l = Listener(callback) somesignal.add(l) assert len(somesignal._link) == 1 l.remove() assert len(somesignal._link) == 0
The 2nd assert throws an exception
… and the listener still keeps a reference to the signal after removal
l = Listener(callback) somesignal.add(l) assert l._signal is not None l.remove() assert l._signal is None # fails
The
Listener.remove()
method does not remove the listener fromSignal._link
. Only elements are added toSignal._link
, but never removed.The following should hold true:
The 2nd assert throws an exception