[PATCH 7 of 8 v3] tests: make test-pathencode use print_function
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Fri Apr 15 04:46:22 EDT 2016
patches 1-4 and 6-7 are pushed. Thanks
On 04/13/2016 01:01 PM, Pulkit Goyal wrote:
> # HG changeset patch
> # User Pulkit Goyal <7895pulkit at gmail.com>
> # Date 1460576205 -19800
> # Thu Apr 14 01:06:45 2016 +0530
> # Node ID 6b0befc9866f13cfa1aaa8610e37a4c5e89a89c0
> # Parent 9a228f01f2bf77a743b878d8c1641d6b33ee8518
> tests: make test-pathencode use print_function
>
> diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t
> --- a/tests/test-check-py3-compat.t
> +++ b/tests/test-check-py3-compat.t
> @@ -61,7 +61,6 @@
> tests/test-lrucachedict.py requires print_function
> tests/test-manifest.py not using absolute_import
> tests/test-pathencode.py not using absolute_import
> - tests/test-pathencode.py requires print_function
> tests/test-trusted.py requires print_function
>
> #if py3exe
> diff --git a/tests/test-pathencode.py b/tests/test-pathencode.py
> --- a/tests/test-pathencode.py
> +++ b/tests/test-pathencode.py
> @@ -5,6 +5,8 @@
> # that have proven likely to expose bugs and divergent behavior in
> # different encoding implementations.
>
> +from __future__ import print_function
> +
> from mercurial import store
> import binascii, itertools, math, os, random, sys, time
> import collections
> @@ -154,10 +156,10 @@
> r = store._hybridencode(p, True) # reference implementation in Python
> if h != r:
> if nerrs == 0:
> - print >> sys.stderr, 'seed:', hex(seed)[:-1]
> - print >> sys.stderr, "\np: '%s'" % p.encode("string_escape")
> - print >> sys.stderr, "h: '%s'" % h.encode("string_escape")
> - print >> sys.stderr, "r: '%s'" % r.encode("string_escape")
> + print('seed:', hex(seed)[:-1], file=sys.stderr)
> + print("\np: '%s'" % p.encode("string_escape"), file=sys.stderr)
> + print("h: '%s'" % h.encode("string_escape"), file=sys.stderr)
> + print("r: '%s'" % r.encode("string_escape"), file=sys.stderr)
> nerrs += 1
> return nerrs
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list