~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_merge.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:
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')