~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2012-01-28 13:24:39 UTC
  • mfrom: (6450.1.1 bzr.dev)
  • Revision ID: pqm@pqm.ubuntu.com-20120128132439-phvlss4cq7bf5rji
(jelmer) Merge the 2.5 branch. (Jelmer Vernooij)

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()))