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

login
register
mail settings
Submitter Augie Fackler
Date Sept. 16, 2017, 5:29 p.m.
Message ID <bf018e7bcc466062c9dd.1505582945@imladris.local>
Download mbox | patch
Permalink /patch/23950/
State Accepted
Headers show

Comments

Augie Fackler - Sept. 16, 2017, 5:29 p.m.
# HG changeset patch
# User Augie Fackler <raf@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

Patch

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'))