##// END OF EJS Templates
py3: drop xrange
marcink -
r982:9917a6cc python3
parent child Browse files
Show More
@@ -41,7 +41,7 b' class EchoAppStream(object):'
41 41 start_response(status, headers)
42 42
43 43 def generator():
44 for _ in xrange(1000000):
44 for _ in range(1000000):
45 45 yield "ECHO"
46 46 return generator()
47 47
@@ -703,7 +703,7 b' class HgRemote(RemoteBase):'
703 703 return len(repo) - 1, 0
704 704
705 705 stop, start = get_revs(repo, [node + ':'])
706 revs = [hex(repo[r].node()) for r in xrange(start, stop + 1)]
706 revs = [hex(repo[r].node()) for r in range(start, stop + 1)]
707 707 return revs
708 708
709 709 @reraise_safe_exceptions
@@ -219,7 +219,7 b' def _check_heads(repo, start, end, commi'
219 219 # The heads descending from that parent, on the same branch
220 220 parent_heads = set([p])
221 221 reachable = set([p])
222 for x in xrange(p + 1, end):
222 for x in range(p + 1, end):
223 223 if get_ctx(repo, x).branch() != branch:
224 224 continue
225 225 for pp in changelog.parentrevs(x):
@@ -212,7 +212,7 b' class GitRepository(object):'
212 212 return
213 213
214 214 chunker = (
215 data[i:i + chunk_size] for i in xrange(0, len(data), chunk_size))
215 data[i:i + chunk_size] for i in range(0, len(data), chunk_size))
216 216
217 217 for chunk in chunker:
218 218 proto.write_sideband(2, chunk)
@@ -27,13 +27,13 b' def data():'
27 27
28 28 def test_http_app_streaming_with_data(data, repeat, vcs_app):
29 29 app = vcs_app
30 for x in xrange(repeat / 10):
30 for x in range(repeat / 10):
31 31 response = app.post('/stream/git/', params=data)
32 32 assert response.status_code == 200
33 33
34 34
35 35 def test_http_app_streaming_no_data(repeat, vcs_app):
36 36 app = vcs_app
37 for x in xrange(repeat / 10):
37 for x in range(repeat / 10):
38 38 response = app.post('/stream/git/')
39 39 assert response.status_code == 200
@@ -32,7 +32,7 b' class KindaFilelike(object): # pragma: '
32 32 self.stream = self._get_stream(data, chunks)
33 33
34 34 def _get_stream(self, data, chunks):
35 for x in xrange(chunks):
35 for x in range(chunks):
36 36 yield data
37 37
38 38 def read(self, n):
General Comments 0
You need to be logged in to leave comments. Login now