/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 breezy/tests/test_diff.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-10-28 16:21:36 UTC
  • mfrom: (7141.1.2 diff-without-python)
  • Revision ID: breezy.the.bot@gmail.com-20181028162136-ac2a78yutdtrn6jm
Use sys.executable rather than 'python' for ad-hoc tests.

Merged from https://code.launchpad.net/~jelmer/brz/diff-without-python/+merge/357913

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
import os
18
18
import re
19
19
import subprocess
 
20
import sys
20
21
import tempfile
21
22
 
22
23
from .. import (
1430
1431
 
1431
1432
    def test_execute(self):
1432
1433
        output = BytesIO()
1433
 
        diff_obj = diff.DiffFromTool(['python', '-c',
 
1434
        diff_obj = diff.DiffFromTool([sys.executable, '-c',
1434
1435
                                      'print("@old_path @new_path")'],
1435
1436
                                     None, None, output)
1436
1437
        self.addCleanup(diff_obj.finish)
1458
1459
        basis_tree = tree.basis_tree()
1459
1460
        basis_tree.lock_read()
1460
1461
        self.addCleanup(basis_tree.unlock)
1461
 
        diff_obj = diff.DiffFromTool(['python', '-c',
 
1462
        diff_obj = diff.DiffFromTool([sys.executable, '-c',
1462
1463
                                      'print "@old_path @new_path"'],
1463
1464
                                     basis_tree, tree, output)
1464
1465
        diff_obj._prepare_files('file', 'file', file_id=b'file-id')
1494
1495
        self.addCleanup(old_tree.unlock)
1495
1496
        tree.lock_read()
1496
1497
        self.addCleanup(tree.unlock)
1497
 
        diff_obj = diff.DiffFromTool(['python', '-c',
 
1498
        diff_obj = diff.DiffFromTool([sys.executable, '-c',
1498
1499
                                      'print "@old_path @new_path"'],
1499
1500
                                     old_tree, tree, output)
1500
1501
        self.addCleanup(diff_obj.finish)