def test_signal_introspection(self):
        sig = signals.Signal('sig')
        self.assertEqual(sig.get_connections(), set())

        def on_foo():
            pass
        class Foo(object):
            def f(self):
                pass
        f = Foo()

        sig.connect(on_foo)
        sig.connect(f.f)

        self.assertEqual(sig.get_connections(), set([on_foo, f.f]))

        sig.disconnect(on_foo)
        self.assertEqual(sig.get_connections(), set([f.f]))

        del f
        gc.collect()
        self.assertEqual(sig.get_connections(), set())
Create a new L{HandshakeCallbackContextFactory} and return a two-tuple
dataset/ETHPy150Open mitsuhiko/solace/solace/tests/signals.py/SignalTestCase.test_signal_introspection--crossover with--dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/protocols/test/test_tls.py/HandshakeCallbackContextFactory.factoryAndDeferred