~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Wouter van Heyst
  • Date: 2012-01-25 19:36:44 UTC
  • mto: (6437.3.27 2.5)
  • mto: This revision was merged to the branch mainline in revision 6451.
  • Revision ID: larstiq@larstiq.dyndns.org-20120125193644-gm2sfebvmqhv7awj
close files returned by transport.get

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
                    source_file = source.get(path)
 
129
                    target_file = target.get(path)
 
130
                    self.assertEqualDiff(source_file.read(),
 
131
                                         target_file.read(),
130
132
                                         "text for file %r differs:\n" % path)
 
133
                    source_file.close()
 
134
                    target_file.close()
131
135
 
132
136
    def assertRepositoryHasSameItems(self, left_repo, right_repo):
133
137
        """require left_repo and right_repo to contain the same data."""