/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/plugins/grep/test_grep.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-07-25 03:06:42 UTC
  • mfrom: (7045.3.4 python3-r)
  • Revision ID: breezy.the.bot@gmail.com-20180725030642-oghhedvui3470wy6
Fix another ~500 tests on Python 3.

Merged from https://code.launchpad.net/~jelmer/brz/python3-r/+merge/350430

Show diffs side-by-side

added added

removed removed

Lines of Context:
1939
1939
        self.build_tree(contents)
1940
1940
        tree.add(contents)
1941
1941
        tree.commit("Initial commit")
1942
 
        as_utf8 = u"\u1234".encode("UTF-8")
 
1942
        as_utf8 = u"\u1234"
1943
1943
 
1944
1944
        # GZ 2010-06-07: Note we can't actually grep for \u1234 as the pattern
1945
1945
        #                is mangled according to the user encoding.
1946
1946
        streams = self.run_bzr(["grep", "--files-with-matches",
1947
1947
            u"contents"], encoding="UTF-8")
 
1948
        if not PY3:
 
1949
            as_utf8 = as_utf8.encode("UTF-8")
1948
1950
        self.assertEqual(streams, (as_utf8 + "\n", ""))
1949
1951
 
1950
1952
        streams = self.run_bzr(["grep", "-r", "1", "--files-with-matches",