~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/cleanup.py

  • Committer: Martin Pool
  • Date: 2010-04-27 07:29:11 UTC
  • mto: This revision was merged to the branch mainline in revision 5295.
  • Revision ID: mbp@sourcefrog.net-20100427072911-hagcu863rqbu4mal
Add simple test case for ObjectWithCleanups

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
class ObjectWithCleanups(object):
82
82
    """A mixin for objects that hold a cleanup list.
83
83
 
84
 
    Subclass or client code can call add_cleanup and then later run_cleanups.
 
84
    Subclass or client code can call add_cleanup and then later `cleanup_now`.
85
85
    """
86
86
    def __init__(self):
87
87
        self.cleanups = deque()