/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: Canonical.com Patch Queue Manager
  • Date: 2008-01-02 20:46:44 UTC
  • mfrom: (3145.1.2 no-inventory4)
  • Revision ID: pqm@pqm.ubuntu.com-20080102204644-m6dav0cszl5e471x
Handle missing tools gracefully in diff --using (abentley)

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')