Skip to content

Commit

Permalink
cosmetics (make it easier to read)
Browse files Browse the repository at this point in the history
  • Loading branch information
philikon committed Jul 28, 2007
1 parent b74b92b commit da7cab2
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions tests.py
Expand Up @@ -1258,14 +1258,17 @@ def old_tests():
>>> def checkContext(self, o):
... # Python equivalent to aq_inContextOf
... from Acquisition import aq_base, aq_parent, aq_inner
... subob = self
... next = self
... o = aq_base(o)
... while 1:
... if aq_base(subob) is o: return 1
... self = aq_inner(subob)
... if self is None: break
... subob = aq_parent(self)
... if subob is None: break
... if aq_base(next) is o:
... return 1
... self = aq_inner(next)
... if self is None:
... break
... next = aq_parent(self)
... if next is None:
... break
>>> checkContext(b.c, b)
Expand Down

0 comments on commit da7cab2

Please sign in to comment.