[PATCH 2 of 3 py3] tests: add xrange alias for test-pathencode.py

Augie Fackler raf at durin42.com
Sat Sep 16 13:29:05 EDT 2017


# HG changeset patch
# User Augie Fackler <raf at durin42.com>
# Date 1505576873 14400
#      Sat Sep 16 11:47:53 2017 -0400
# Node ID bf018e7bcc466062c9dd0e845319d269c4e85acb
# Parent  20ba461506803cda0aa521d5e61e83bc17202d10
tests: add xrange alias for test-pathencode.py

diff --git a/tests/test-pathencode.py b/tests/test-pathencode.py
--- a/tests/test-pathencode.py
+++ b/tests/test-pathencode.py
@@ -19,6 +19,11 @@ from mercurial import (
     store,
 )
 
+try:
+    xrange
+except NameError:
+    xrange = range
+
 validchars = set(map(chr, range(0, 256)))
 alphanum = range(ord('A'), ord('Z'))
 


More information about the Mercurial-devel mailing list