~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/branch_implementations/test_break_lock.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-09-22 04:23:27 UTC
  • mfrom: (1551.19.52 test-kipple)
  • Revision ID: pqm@pqm.ubuntu.com-20080922042327-druvxn7q10gs3fw4
Fix test kipple by unlocking repo

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
    def test_unlocked_repo_locked(self):
51
51
        # break lock on the branch should try on the repository even
52
52
        # if the branch isn't locked
53
 
        self.branch.repository.lock_write()
 
53
        token = self.branch.repository.lock_write()
 
54
        if token is None:
 
55
            self.branch.repository.unlock()
 
56
            raise TestNotApplicable('Repository does not use physical locks.')
 
57
        self.branch.repository.leave_lock_in_place()
 
58
        self.branch.repository.unlock()
54
59
        other_instance = self.branch.repository.bzrdir.open_repository()
55
60
        if not other_instance.get_physical_lock_status():
56
61
            raise TestNotApplicable("Repository does not lock persistently.")