#NEWLINE# def test_weak_receiver( ) : #NEWLINE# #INDENT# sentinel = [ ] #NEWLINE# def received( sender , **kw ) : #NEWLINE# #INDENT# sentinel . append ( kw ) #NEWLINE# #UNINDENT# sig = blinker . Signal ( ) #NEWLINE# if jython : #NEWLINE# #INDENT# sig . connect ( received ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# sig . connect ( received , weak = True ) #NEWLINE# #UNINDENT# del received #NEWLINE# collect_acyclic_refs ( ) #NEWLINE# assert ( not sentinel ) #NEWLINE# sig . send ( ) #NEWLINE# assert ( not sentinel ) #NEWLINE# assert ( not sig . receivers ) #NEWLINE# values_are_empty_sets_ ( sig . _by_receiver ) #NEWLINE# values_are_empty_sets_ ( sig . _by_sender )