/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_grep.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-02-14 03:16:54 UTC
  • mfrom: (7479.2.3 no-more-python2)
  • Revision ID: breezy.the.bot@gmail.com-20200214031654-bp1xtv2jr9nmhto3
Drop python2 support.

Merged from https://code.launchpad.net/~jelmer/brz/no-more-python2/+merge/378694

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
import unicodedata as ud
22
22
 
23
23
from .. import tests, osutils
24
 
from ..sixish import PY3
25
24
from .._termcolor import color_string, FG
26
25
 
27
26
from ..tests.features import (
390
389
 
391
390
        out, err = self.run_bzr(
392
391
            ['grep', '-r', 'last:1', '--null', 'line[1-3]'])
393
 
        if not PY3:
394
 
            out = out.decode('utf-8', 'ignore')
395
392
        nout = ud.normalize(u'NFC', out)
396
393
        self.assertEqual(nout, nref)
397
394
        self.assertEqual(len(out.splitlines()), 1)
398
395
 
399
396
        out, err = self.run_bzr(['grep', '-r', 'last:1', '-Z', 'line[1-3]'])
400
 
        if not PY3:
401
 
            out = out.decode('utf-8', 'ignore')
402
397
        nout = ud.normalize(u'NFC', out)
403
398
        self.assertEqual(nout, nref)
404
399
        self.assertEqual(len(out.splitlines()), 1)
405
400
 
406
401
        out, err = self.run_bzr(['grep', '-r', 'last:1', '--null', 'line'])
407
 
        if not PY3:
408
 
            out = out.decode('utf-8', 'ignore')
409
402
        nout = ud.normalize(u'NFC', out)
410
403
        self.assertEqual(nout, nref)
411
404
        self.assertEqual(len(out.splitlines()), 1)