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