Skip to content

Commit

Permalink
Replace another xrange call
Browse files Browse the repository at this point in the history
  • Loading branch information
timjb committed Sep 28, 2012
1 parent 9418054 commit 4bd9efb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_text_operation.py
Expand Up @@ -12,9 +12,10 @@ def random_string(max_len=16):
"""Generate a random string."""

s = ''
for i in xrange(0, random.randint(0, max_len)):
# append random lowercase ascii character
s_len = random.randint(0, max_len)
while s_len > 0:
s += random_char()
s_len -= 1
return s


Expand Down

0 comments on commit 4bd9efb

Please sign in to comment.