/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_diff.py

  • Committer: Aaron Bentley
  • Date: 2007-12-28 16:37:46 UTC
  • mto: This revision was merged to the branch mainline in revision 3154.
  • Revision ID: abentley@panoramicfeedback.com-20071228163746-975r76opsppiwstk
Handle missing tools gracefully in diff --using

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    internal_diff,
31
31
    show_diff_trees,
32
32
    )
33
 
from bzrlib.errors import BinaryFile, NoDiff
 
33
from bzrlib.errors import BinaryFile, NoDiff, ExecutableMissing
34
34
import bzrlib.osutils as osutils
35
35
import bzrlib.patiencediff
36
36
import bzrlib._patiencediff_py
1258
1258
        diff_obj._execute('old', 'new')
1259
1259
        self.assertEqual(output.getvalue(), 'old new\n')
1260
1260
 
 
1261
    def test_excute_missing(self):
 
1262
        diff_obj = DiffFromTool(['a-tool-which-is-unlikely-to-exist'],
 
1263
                                None, None, None)
 
1264
        self.addCleanup(diff_obj.finish)
 
1265
        e = self.assertRaises(ExecutableMissing, diff_obj._execute, 'old',
 
1266
                              'new')
 
1267
        self.assertEqual('a-tool-which-is-unlikely-to-exist could not be found'
 
1268
                         ' on this machine', str(e))
 
1269
 
1261
1270
    def test_prepare_files(self):
1262
1271
        output = StringIO()
1263
1272
        tree = self.make_branch_and_tree('tree')