comparison tests/test-mq-qimport.t @ 36292:b543b3ce608b

py3: use range instead of xrange in tests/test-mq-qimport.t xrange is not present on Python 3. Differential Revision: https://phab.mercurial-scm.org/D2330
author Pulkit Goyal <7895pulkit@gmail.com>
date Sun, 18 Feb 2018 18:20:21 +0530
parents 85c94c9d342b
children d17cfb23017c
comparison
equal deleted inserted replaced
36291:57c671cf7a69 36292:b543b3ce608b
5 > path = sys.argv[1] 5 > path = sys.argv[1]
6 > args = sys.argv[2:] 6 > args = sys.argv[2:]
7 > assert (len(args) % 2) == 0 7 > assert (len(args) % 2) == 0
8 > 8 >
9 > f = open(path, 'wb') 9 > f = open(path, 'wb')
10 > for i in xrange(len(args)/2): 10 > for i in range(len(args)/2):
11 > count, s = args[2*i:2*i+2] 11 > count, s = args[2*i:2*i+2]
12 > count = int(count) 12 > count = int(count)
13 > s = s.decode('string_escape') 13 > s = s.decode('string_escape')
14 > f.write(s*count) 14 > f.write(s*count)
15 > f.close() 15 > f.close()