From 0cda7ee911d4117ae3e94e808b76650013f85b6b Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Wed, 21 Nov 2012 23:04:06 +0000 Subject: Ensure an activity is really down after stopping it --- (limited to 'tests/tree.py') diff --git a/tests/tree.py b/tests/tree.py index fe6d24f..414a900 100644 --- a/tests/tree.py +++ b/tests/tree.py @@ -17,7 +17,9 @@ def retry_find(func): kwargs.get("role_name", None)) result = func(*args, **kwargs) - if result: + expect_none = kwargs.get("expect_none", False) + if (not expect_none and result) or \ + (expect_none and not result): return result time.sleep(5) @@ -43,7 +45,7 @@ class Node: return True @retry_find - def find_child(self, name=None, role_name=None): + def find_child(self, name=None, role_name=None, expect_none=False): def predicate(accessible): return self._predicate(accessible, name, role_name) -- cgit v0.9.1