[Telepathy] twisted test question

Jonathon Jongsma jonathon.jongsma at collabora.co.uk
Tue Jan 27 13:29:21 PST 2009


As many of you are aware, I'm adding some test cases to telepathy-idle.  I have 
a decent feel for the test infrastructure now, but I don't see any way to assert 
that an event doesn't happen.  For instance, if you want to assert that a 
dbus-signal is emitted, you can do things like:

	q.expect('dbus-signal', ...)

but I don't see any way to specify that something shout NOT happen, maybe 
something like:

	q.expect_not('dbus-signal', ...)

or perhaps more usefully, something like:

	q.expect_many(EventPattern('foo'),
         	      EventPattern('bar'),
	              ForbidEventPattern('baz'))

that would require events 'foo' and 'bar' to happen but fail if event 'baz' occurs.

Is there anything like that available?  Has anybody wanted to do something 
similar and found a different way to achieve it?

Thanks
jonner


More information about the Telepathy mailing list