[telepathy-gabble/master] Add docstrings to [un]forbid_events
Will Thompson
will.thompson at collabora.co.uk
Tue Apr 7 04:39:46 PDT 2009
These clarify that you must pass the same EventPattern instance to
unforbid_events that you passed to forbid_events
---
tests/twisted/servicetest.py | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/tests/twisted/servicetest.py b/tests/twisted/servicetest.py
index dc3fd93..ef074a5 100644
--- a/tests/twisted/servicetest.py
+++ b/tests/twisted/servicetest.py
@@ -101,9 +101,19 @@ class BaseEventQueue:
return self.expect(type, **kw)
def forbid_events(self, patterns):
+ """
+ Add patterns (an iterable of EventPattern) to the set of forbidden
+ events. If a forbidden event occurs during an expect or expect_many,
+ the test will fail.
+ """
self.forbidden_events.update(set(patterns))
def unforbid_events(self, patterns):
+ """
+ Remove 'patterns' (an iterable of EventPattern) from the set of
+ forbidden events. These must be the same EventPattern pointers that
+ were passed to forbid_events.
+ """
self.forbidden_events.difference_update(set(patterns))
def _check_forbidden(self, event):
--
1.5.6.5
More information about the telepathy-commits
mailing list