~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/workingtree_implementations/test_locking.py

Merge Tree.changes_from work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
        # manually unlock the branch, preparing a LockNotHeld error.
88
88
        wt.branch.unlock()
89
89
        # the branch *may* still be locked here, if its an all-in-one
90
 
        # implementation
 
90
        # implementation because there is a single lock object with three
 
91
        # references on it, and unlocking the branch only drops this by two
91
92
        self.assertRaises(errors.LockNotHeld, wt.unlock)
92
93
        # but now, the tree must be unlocked
93
94
        self.assertFalse(wt.is_locked())
108
109
        try:
109
110
            try:
110
111
                wt.lock_read()
111
 
            except:
 
112
            except errors.LockError:
112
113
                # any error here means the locks are exclusive in some 
113
114
                # manner
114
115
                self.assertFalse(wt.is_locked())