File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -261,6 +261,32 @@ def test_callback_wrong_disconnect(self):
261261 # check we still have callbacks registered
262262 self .is_not_empty ()
263263
264+ @pytest .mark .xfail (reason = "must be fixed" )
265+ def test_registration_on_non_empty_registry (self ):
266+ # ensure we start with an empty registry
267+ self .is_empty ()
268+
269+ # setup the registry with a callback
270+ mini_me = Test_callback_registry ()
271+ self .connect (self .signal , mini_me .dummy )
272+
273+ # Add another callback
274+ mini_me2 = Test_callback_registry ()
275+ self .connect (self .signal , mini_me2 .dummy )
276+
277+ # Remove and add the second callback
278+ mini_me2 = Test_callback_registry ()
279+ self .connect (self .signal , mini_me2 .dummy )
280+
281+ # We still have 2 references
282+ self .is_not_empty ()
283+ assert self .count () == 2
284+
285+ # Removing the last 2 references
286+ mini_me = None
287+ mini_me2 = None
288+ self .is_empty ()
289+
264290 def dummy (self ):
265291 pass
266292
You can’t perform that action at this time.
0 commit comments