~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Ian Clatworthy
  • Date: 2007-12-07 05:53:45 UTC
  • mfrom: (3078.2.8 bzr.switch)
  • mto: This revision was merged to the branch mainline in revision 3093.
  • Revision ID: ian.clatworthy@internode.on.net-20071207055345-ek2m118pm79nowuf
switch for heavyweight checkouts

Show diffs side-by-side

added added

removed removed

Lines of Context:
577
577
        self.assertEqual(None,
578
578
            made_branch._format.get_reference(made_branch.bzrdir))
579
579
 
 
580
    def test_set_reference(self):
 
581
        """set_reference on all regular branches should be callable."""
 
582
        if not self.branch_format.is_supported():
 
583
            # unsupported formats are not loopback testable
 
584
            # because the default open will not open them and
 
585
            # they may not be initializable.
 
586
            return
 
587
        this_branch = self.make_branch('this')
 
588
        other_branch = self.make_branch('other')
 
589
        try:
 
590
            this_branch._format.set_reference(this_branch.bzrdir, other_branch)
 
591
        except NotImplementedError:
 
592
            # that's ok
 
593
            pass
 
594
        else:
 
595
            ref = this_branch._format.get_reference(this_branch.bzrdir)
 
596
            self.assertEqual(ref, other_branch.base)
 
597
 
580
598
    def test_format_initialize_find_open(self):
581
599
        # loopback test to check the current format initializes to itself.
582
600
        if not self.branch_format.is_supported():