~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_commit.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-01 19:18:09 UTC
  • mfrom: (6459 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6460.
  • Revision ID: jelmer@samba.org-20120201191809-xn340a5i5v4fqsfu
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
        self.requireFeature(features.UnicodeFilenameFeature)
140
140
        file_name = u'\N{euro sign}'
141
141
        self.run_bzr(['init'])
142
 
        open(file_name, 'w').write('hello world')
 
142
        with open(file_name, 'w') as f: f.write('hello world')
143
143
        self.run_bzr(['add'])
144
144
        out, err = self.run_bzr(['commit', '-m', file_name])
145
145
        reflags = re.MULTILINE|re.DOTALL|re.UNICODE
157
157
        try:
158
158
            osutils.get_terminal_encoding = lambda trace=None: 'ascii'
159
159
            file_name = u'foo\u1234'
160
 
            open(file_name, 'w').write('hello world')
 
160
            with open(file_name, 'w') as f: f.write('hello world')
161
161
            self.run_bzr(['add'])
162
162
            out, err = self.run_bzr(['commit', '-m', file_name])
163
163
            reflags = re.MULTILINE|re.DOTALL|re.UNICODE