~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-06-09 01:16:57 UTC
  • mfrom: (1752.1.4 configobj)
  • Revision ID: pqm@pqm.ubuntu.com-20060609011657-d676366b38b5689b
merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
679
679
        self.apply_redirected(out, err, None, bzrlib.tests.selftest, 
680
680
            test_suite_factory=factory)
681
681
        self.assertEqual([True], factory_called)
 
682
 
 
683
    def test_run_bzr_external(self):
 
684
        """The run_bzr_helper_external comand behaves nicely."""
 
685
        result = self.run_bzr_external('--version')
 
686
        self.assertContainsRe(result[0], 'is free software')
 
687
        self.assertRaises(AssertionError, self.run_bzr_external, '--versionn')
 
688
        result = self.run_bzr_external('--versionn', retcode=3)
 
689
        self.assertContainsRe(result[1], 'unknown command')
 
690
        err = self.run_bzr_external('merge --merge-type "magic merge"', 
 
691
                                    retcode=3)[1]
 
692
        self.assertContainsRe(err, 'No known merge type magic merge')
 
693
        err = self.run_bzr_external('merge', '--merge-type', 'magic merge', 
 
694
                                    retcode=3)[1]
 
695
        self.assertContainsRe(err, 'No known merge type magic merge')