~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_msgeditor.py

  • Committer: Daniel Watkins
  • Date: 2007-08-07 11:38:26 UTC
  • mto: (2765.1.1 ianc-integration)
  • mto: This revision was merged to the branch mainline in revision 2766.
  • Revision ID: d.m.watkins@warwick.ac.uk-20070807113826-5b98xh1jcllm1frx
Updated as per poolie's !tweak.

Show diffs side-by-side

added added

removed removed

Lines of Context:
219
219
 
220
220
    def test_unsupported_encoding_commit_message(self):
221
221
        old_env = osutils.set_or_unset_env('LANG', 'C')
222
 
        self.make_fake_editor(message='\xff')
 
222
        try:
 
223
            self.make_fake_editor(message='\xff')
223
224
 
224
 
        working_tree = self.make_uncommitted_tree()
225
 
        self.assertRaises(errors.BadCommitMessageEncoding,
 
225
            working_tree = self.make_uncommitted_tree()
 
226
            self.assertRaises(errors.BadCommitMessageEncoding,
226
227
                                    bzrlib.msgeditor.edit_commit_message, '')
227
 
 
228
 
        osutils.set_or_unset_env('LANG', old_env)
 
228
        finally:
 
229
            osutils.set_or_unset_env('LANG', old_env)