Skip to content
Snippets Groups Projects
Unverified Commit 12080b76 authored by Andre LaBranche's avatar Andre LaBranche Committed by GitHub
Browse files

More conditional use of xrange

parent b6be0a55
No related branches found
Tags PyKerberos-1.1
No related merge requests found
......@@ -154,8 +154,15 @@ def test_leaks_client():
def n_times(count):
before = psutil.Process().memory_info().rss
for _ in xrange(count):
client_init()
# We're testing for memory leaks, so use xrange instead of range in python2
if sys.version_info[0] > 2:
for _ in range(COUNT):
client_init()
else:
for _ in xrange(COUNT):
client_init()
# Because I'm not entirely certain that python's gc guaranty's timeliness
# of destructors, lets kick off a manual gc.
gc.collect()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment