~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_merge.py

  • Committer: Jelmer Vernooij
  • Date: 2012-01-31 15:43:17 UTC
  • mfrom: (6437.3.28 2.5)
  • mto: (6437.23.1 2.5)
  • mto: This revision was merged to the branch mainline in revision 6458.
  • Revision ID: jelmer@samba.org-20120131154317-y028tz0r9xesvn9p
MergeĀ 2.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
152
152
    def test_create_rename(self):
153
153
        """Rename an inventory entry while creating the file"""
154
154
        tree =self.make_branch_and_tree('.')
155
 
        file('name1', 'wb').write('Hello')
 
155
        with file('name1', 'wb') as f: f.write('Hello')
156
156
        tree.add('name1')
157
157
        tree.commit(message="hello")
158
158
        tree.rename_one('name1', 'name2')
165
165
        os.mkdir('dirname1')
166
166
        tree.add('dirname1')
167
167
        filename = pathjoin('dirname1', 'name1')
168
 
        file(filename, 'wb').write('Hello')
 
168
        with file(filename, 'wb') as f: f.write('Hello')
169
169
        tree.add(filename)
170
170
        tree.commit(message="hello")
171
171
        filename2 = pathjoin('dirname1', 'name2')