~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/lock_helpers.py

  • Committer: John Arbash Meinel
  • Date: 2009-10-12 17:03:40 UTC
  • mfrom: (4679.3.94 2.1-simple-set)
  • mto: This revision was merged to the branch mainline in revision 4736.
  • Revision ID: john@arbash-meinel.com-20091012170340-o21aj90jbtswo9m4
Bring in the latest 'simple-set' code.

This is just a prep step for refining and landing the StaticTuple code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
"""Helper functions/classes for testing locking"""
18
18
 
19
19
from bzrlib import errors
 
20
from bzrlib.decorators import only_raises
20
21
 
21
22
 
22
23
class TestPreventLocking(errors.LockError):
68
69
            return self._other.lock_write()
69
70
        raise TestPreventLocking('lock_write disabled')
70
71
 
 
72
    @only_raises(errors.LockNotHeld, errors.LockBroken)
71
73
    def unlock(self):
72
74
        self._sequence.append((self._other_id, 'ul', self._allow_unlock))
73
75
        if self._allow_unlock: