~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Robert Collins
  • Date: 2007-03-29 07:24:14 UTC
  • mto: (2018.18.6 hpss-faster-copy)
  • mto: This revision was merged to the branch mainline in revision 2435.
  • Revision ID: robertc@robertcollins.net-20070329072414-7dh0io231c2tormb
Branch implementations test test_set_get_parent should not depend on local urls : the test can be valid for any url namespace. Change it to be valid in that manner. (Robert Collins, Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
    gpg,
27
27
    urlutils,
28
28
    transactions,
 
29
    remote,
29
30
    repository,
30
31
    )
31
32
from bzrlib.branch import Branch, needs_read_lock, needs_write_lock
367
368
        # config file in the branch.
368
369
        branch.nick = "Aaron's branch"
369
370
        branch.nick = "Aaron's branch"
370
 
        try:
 
371
        if not isinstance(branch, remote.RemoteBranch):
371
372
            controlfilename = branch.control_files.controlfilename
372
 
        except AttributeError:
373
 
            # remote branches don't have control_files
374
 
            pass
375
 
        else:
376
 
            self.failUnless(
377
 
                t.has(t.relpath(controlfilename("branch.conf"))))
 
373
            self.failUnless(t.has(t.relpath(controlfilename("branch.conf"))))
378
374
        # Because the nick has been set explicitly, the nick is now always
379
375
        # "Aaron's branch", regardless of directory name.
380
376
        self.assertEqual(branch.nick, "Aaron's branch")