8
8
"signal-oneargs": ["firstarg"],
12
11
def emit_signal_one_args(self, firstarg):
13
12
self.emit("signal-oneargs", firstarg)
160
158
self.object.emit("signal-oneargs", 42)
160
def test_disconnect_while_handling(self):
161
# When the handler being called disconnects itself,
162
# the next handler must not be skipped.
164
def firstCb(unused_object):
165
self.object.disconnect_by_function(firstCb)
167
def secondCb(unused_object):
171
self.object.connect("signal-oneargs", firstCb)
172
self.object.connect("signal-oneargs", secondCb)
173
self.object.emit("signal-oneargs")
174
self.assertTrue(self.called)
177
def test_disconnect_following_handler_while_handling(self):
178
# When the handler being called disconnects a following handler,
179
# the following handler must be skipped.
181
def firstCb(unused_object):
182
self.object.disconnect_by_function(secondCb)
184
def secondCb(unused_object):
188
self.object.connect("signal-oneargs", firstCb)
189
self.object.connect("signal-oneargs", secondCb)
190
self.object.emit("signal-oneargs")
191
self.assertFalse(self.called)
162
194
def test04_emit01(self):
163
195
# signal: no arguments
164
196
# connect: no arguments