~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Vincent Ladeuil
  • Date: 2008-01-29 08:40:53 UTC
  • mto: (3206.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 3207.
  • Revision ID: v.ladeuil+lp@free.fr-20080129084053-sunwf549ox6zczqr
Fix two more leaked log files.

* bzrlib/tests/test_http.py:
(TestHttpProxyWhiteBox.tearDown): Call the base class tearDown.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
 
19
19
import os
 
20
import sys
20
21
from StringIO import StringIO
21
22
 
22
23
from bzrlib import (
192
193
    def test_mailto_option(self):
193
194
        self.make_trees()
194
195
        branch = _mod_branch.Branch.open('branch')
 
196
        branch.get_config().set_user_option('mail_client', 'editor')
 
197
        self.run_bzr_error(('No mail-to address specified',), 'send -f branch')
195
198
        branch.get_config().set_user_option('mail_client', 'bogus')
196
 
        self.run_bzr_error(('No mail-to address specified',), 'send -f branch')
197
199
        self.run_bzr('send -f branch -o-')
198
200
        self.run_bzr_error(('Unknown mail client: bogus',),
199
201
                           'send -f branch --mail-to jrandom@example.org')
235
237
                                 'grandparent'])
236
238
        self.assertEqual('revision1', md.base_revision_id)
237
239
        self.assertEqual('revision3', md.revision_id)
 
240
 
 
241
    def test_nonexistant_branch(self):
 
242
        if sys.platform == "win32":
 
243
            location = "C:/i/do/not/exist/"
 
244
        else:
 
245
            location = "/i/do/not/exist/"
 
246
        out, err = self.run_bzr(["send", "--from", location], retcode=3)
 
247
        self.assertEqual(out, '')
 
248
        self.assertEqual(err, 'bzr: ERROR: Not a branch: "%s".\n' % location)