~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Andrew Bennetts
  • Date: 2007-04-18 05:10:19 UTC
  • mto: This revision was merged to the branch mainline in revision 2435.
  • Revision ID: andrew.bennetts@canonical.com-20070418051019-tek0rr8alo1z2sop
Small changes in response to Aaron's review.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
        # 'control_files' member. So we should fail gracefully if
37
37
        # not there. But assuming it has them lets us test the exact 
38
38
        # lock/unlock order.
39
 
        if isinstance(self.bzrdir_format, RemoteBzrDirFormat):
40
 
            raise TestSkipped(
41
 
                "RemoteRepository objects don't have 'control_files'.")
42
39
        self.locks = []
43
40
        b = LockWrapper(self.locks, self.get_branch(), 'b')
44
41
        b.repository = LockWrapper(self.locks, b.repository, 'r')
45
42
        bcf = b.control_files
46
 
        rcf = b.repository.control_files
 
43
        rcf = getattr(b.repository, 'control_files', None)
 
44
        if rcf is None:
 
45
            raise TestSkipped(
 
46
                "This tests depends on being able to instrument "
 
47
                "repository.control_files, but %r doesn't have control_files."
 
48
                % (b.repository,))
47
49
 
48
50
        # Look out for branch types that reuse their control files
49
51
        self.combined_control = bcf is rcf