~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Rework test_script a little bit.


Don't allow someone to request a stdin request to echo.
Echo never reads from stdin, it just echos its arguments.
You use 'cat' if you want to read from stdin.

A few other fixes because the tests were using filenames
that are actually illegal on Windows, rather than just
nonexistant.


Change the exception handling for commands so that
unknown errors don't get silently squashed and then
turn into hard-to-debug errors later.

test_script now passes on Windows.

Show diffs side-by-side

added added

removed removed

Lines of Context:
280
280
        self.assertEqual('rev3', md.revision_id)
281
281
 
282
282
    def test_nonexistant_branch(self):
283
 
        if sys.platform == "win32":
284
 
            location = "C:/i/do/not/exist/"
285
 
        else:
286
 
            location = "/i/do/not/exist/"
 
283
        self.vfs_transport_factory = tests.MemoryServer
 
284
        location = self.get_url('absentdir/')
287
285
        out, err = self.run_bzr(["send", "--from", location], retcode=3)
288
286
        self.assertEqual(out, '')
289
287
        self.assertEqual(err, 'bzr: ERROR: Not a branch: "%s".\n' % location)
425
423
        self.assertSendFails([])
426
424
        self.assertSendSucceeds(['--no-strict'])
427
425
 
428
 
    def test_push_strict_command_line_override_config(self):
 
426
    def test_send_strict_command_line_override_config(self):
429
427
        self.set_config_send_strict('false')
430
428
        self.assertSendSucceeds([])
431
429
        self.assertSendFails(['--strict'])