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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-07-15 17:06:25 UTC
  • mfrom: (7027.10.3 python3-blackbox-more)
  • Revision ID: breezy.the.bot@gmail.com-20180715170625-ucqimyum5g85letv
Fix some more blackbox tests on Python 3.

Merged from https://code.launchpad.net/~jelmer/brz/python3-blackbox-more/+merge/349622

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
        # There was an error in error reporting for this option
94
94
        out, err = self.run_bzr('diff --prefix old/', retcode=3)
95
95
        self.assertContainsRe(err,
96
 
            b'--prefix expects two values separated by a colon')
 
96
            '--prefix expects two values separated by a colon')
97
97
 
98
98
    def test_diff_p1(self):
99
99
        """diff -p1 produces lkml-style diffs"""
150
150
    def test_diff_nonexistent_dotted_revision(self):
151
151
        out, err = self.run_bzr('diff -r 1.1', retcode=3)
152
152
        self.assertContainsRe(err,
153
 
            b"Requested revision: '1.1' does not exist in branch:")
 
153
            "Requested revision: '1.1' does not exist in branch:")
154
154
 
155
155
    def test_diff_nonexistent_dotted_revision_change(self):
156
156
        out, err = self.run_bzr('diff -c 1.1', retcode=3)
157
157
        self.assertContainsRe(err,
158
 
            b"Requested revision: '1.1' does not exist in branch:")
 
158
            "Requested revision: '1.1' does not exist in branch:")
159
159
 
160
160
    def test_diff_unversioned(self):
161
161
        # Get an error when diffing a non-versioned file.
392
392
            'diff -Oprogress_bar=none -r 1 --diff-options -ub',
393
393
            universal_newlines=True,
394
394
            retcode=None)
395
 
        if 'Diff is not installed on this machine' in err:
 
395
        if b'Diff is not installed on this machine' in err:
396
396
            raise tests.TestSkipped("No external 'diff' is available")
397
397
        self.assertEqual('', err)
398
398
        # We have to skip the stuff in the middle, because it depends
423
423
        self.make_example_branch()
424
424
        self.build_tree_contents([('hello', b'hello world!\n')])
425
425
        output = self.run_bzr_subprocess('diff', retcode=1)[0]
426
 
        self.assertTrue('\n+hello world!\n' in output)
 
426
        self.assertTrue(b'\n+hello world!\n' in output)