Commit d48e4d86 authored by Denis Bilenko's avatar Denis Bilenko

Merge pull request #357 from fantix/xrange

Use six.xrange in tests.
parents 567277f2 886ae3de
import sys
from gevent.hub import PY3
PY3 = sys.version_info[0] >= 3
if PY3:
advance_iterator = next
......@@ -18,6 +19,7 @@ if PY3:
print_ = getattr(builtins, "print")
del builtins
xrange = range
else:
def exec_(code, globs=None, locs=None):
......@@ -31,3 +33,5 @@ else:
elif locs is None:
locs = globs
exec("""exec code in globs, locs""")
xrange = xrange
......@@ -2,6 +2,7 @@ import greentest
import gevent
from gevent import socket
from gevent import backdoor
from six import xrange
def read_until(conn, postfix):
......
import greentest
import gevent
from gevent.event import Event, AsyncResult
from six import xrange
DELAY = 0.01
......
import gevent
import greentest
from six import xrange
class appender(object):
......
......@@ -8,6 +8,7 @@ from time import time
import gevent
import gevent.socket as gevent_socket
from util import log
from six import xrange
resolver = gevent.get_hub().resolver
......
import sys
from six import xrange
if 'runtestcase' in sys.argv[1:]:
......
import os
import gevent
from gevent import core
from six import xrange
for count in xrange(2):
......
......@@ -3,6 +3,7 @@ from contextlib import contextmanager
import gevent
from gevent.event import Event
from time import time
from six import xrange
SMALL = 0.1
......
......@@ -7,6 +7,7 @@ import threading
import time
import unittest
import test_support
from six import xrange
QUEUE_SIZE = 5
......
# testing gevent's Event, Lock, RLock, Semaphore, BoundedSemaphore with standard test_threading
from __future__ import with_statement
from six import xrange
setup_ = '''from gevent import monkey; monkey.patch_all()
from gevent.event import Event
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment