~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_bzrdir/test_bzrdir.py

  • Committer: Jelmer Vernooij
  • Date: 2012-01-28 12:47:17 UTC
  • mfrom: (6437.3.28 2.5)
  • mto: This revision was merged to the branch mainline in revision 6451.
  • Revision ID: jelmer@canonical.com-20120128124717-80ggi7q1y7m2wjf0
MergeĀ 2.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
125
125
                    self.assertTrue(S_ISDIR(target.stat(path).st_mode))
126
126
                    directories.append(path)
127
127
                else:
128
 
                    self.assertEqualDiff(source.get(path).read(),
129
 
                                         target.get(path).read(),
 
128
                    self.assertEqualDiff(source.get_bytes(path),
 
129
                                         target.get_bytes(path),
130
130
                                         "text for file %r differs:\n" % path)
131
131
 
132
132
    def assertRepositoryHasSameItems(self, left_repo, right_repo):
685
685
 
686
686
    def test_get_branches(self):
687
687
        repo = self.make_repository('branch-1')
688
 
        try:
689
 
            target_branch = repo.bzrdir.create_branch(name='foo')
690
 
        except errors.NoColocatedBranchSupport:
 
688
        if not repo.bzrdir._format.colocated_branches:
691
689
            raise TestNotApplicable('Format does not support colocation')
 
690
        target_branch = repo.bzrdir.create_branch(name='foo')
692
691
        repo.bzrdir.set_branch_reference(target_branch)
693
692
        self.assertEqual(set(["", 'foo']),
694
693
                         set(repo.bzrdir.get_branches().keys()))