Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
d48e4d86
Commit
d48e4d86
authored
Dec 18, 2013
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #357 from fantix/xrange
Use six.xrange in tests.
parents
567277f2
886ae3de
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
14 additions
and
1 deletion
+14
-1
greentest/six.py
greentest/six.py
+5
-1
greentest/test__backdoor.py
greentest/test__backdoor.py
+1
-0
greentest/test__event.py
greentest/test__event.py
+1
-0
greentest/test__order.py
greentest/test__order.py
+1
-0
greentest/test__socket_dns.py
greentest/test__socket_dns.py
+1
-0
greentest/test__subprocess_interrupted.py
greentest/test__subprocess_interrupted.py
+1
-0
greentest/test_close_backend_fd.py
greentest/test_close_backend_fd.py
+1
-0
greentest/test_hub_join_timeout.py
greentest/test_hub_join_timeout.py
+1
-0
greentest/test_queue.py
greentest/test_queue.py
+1
-0
greentest/test_threading_2.py
greentest/test_threading_2.py
+1
-0
No files found.
greentest/six.py
View file @
d48e4d86
import
sys
import
sys
from
gevent.hub
import
PY3
PY3
=
sys
.
version_info
[
0
]
>=
3
if
PY3
:
if
PY3
:
advance_iterator
=
next
advance_iterator
=
next
...
@@ -18,6 +19,7 @@ if PY3:
...
@@ -18,6 +19,7 @@ if PY3:
print_
=
getattr
(
builtins
,
"print"
)
print_
=
getattr
(
builtins
,
"print"
)
del
builtins
del
builtins
xrange
=
range
else
:
else
:
def
exec_
(
code
,
globs
=
None
,
locs
=
None
):
def
exec_
(
code
,
globs
=
None
,
locs
=
None
):
...
@@ -31,3 +33,5 @@ else:
...
@@ -31,3 +33,5 @@ else:
elif
locs
is
None
:
elif
locs
is
None
:
locs
=
globs
locs
=
globs
exec
(
"""exec code in globs, locs"""
)
exec
(
"""exec code in globs, locs"""
)
xrange
=
xrange
greentest/test__backdoor.py
View file @
d48e4d86
...
@@ -2,6 +2,7 @@ import greentest
...
@@ -2,6 +2,7 @@ import greentest
import
gevent
import
gevent
from
gevent
import
socket
from
gevent
import
socket
from
gevent
import
backdoor
from
gevent
import
backdoor
from
six
import
xrange
def
read_until
(
conn
,
postfix
):
def
read_until
(
conn
,
postfix
):
...
...
greentest/test__event.py
View file @
d48e4d86
import
greentest
import
greentest
import
gevent
import
gevent
from
gevent.event
import
Event
,
AsyncResult
from
gevent.event
import
Event
,
AsyncResult
from
six
import
xrange
DELAY
=
0.01
DELAY
=
0.01
...
...
greentest/test__order.py
View file @
d48e4d86
import
gevent
import
gevent
import
greentest
import
greentest
from
six
import
xrange
class
appender
(
object
):
class
appender
(
object
):
...
...
greentest/test__socket_dns.py
View file @
d48e4d86
...
@@ -8,6 +8,7 @@ from time import time
...
@@ -8,6 +8,7 @@ from time import time
import
gevent
import
gevent
import
gevent.socket
as
gevent_socket
import
gevent.socket
as
gevent_socket
from
util
import
log
from
util
import
log
from
six
import
xrange
resolver
=
gevent
.
get_hub
().
resolver
resolver
=
gevent
.
get_hub
().
resolver
...
...
greentest/test__subprocess_interrupted.py
View file @
d48e4d86
import
sys
import
sys
from
six
import
xrange
if
'runtestcase'
in
sys
.
argv
[
1
:]:
if
'runtestcase'
in
sys
.
argv
[
1
:]:
...
...
greentest/test_close_backend_fd.py
View file @
d48e4d86
import
os
import
os
import
gevent
import
gevent
from
gevent
import
core
from
gevent
import
core
from
six
import
xrange
for
count
in
xrange
(
2
):
for
count
in
xrange
(
2
):
...
...
greentest/test_hub_join_timeout.py
View file @
d48e4d86
...
@@ -3,6 +3,7 @@ from contextlib import contextmanager
...
@@ -3,6 +3,7 @@ from contextlib import contextmanager
import
gevent
import
gevent
from
gevent.event
import
Event
from
gevent.event
import
Event
from
time
import
time
from
time
import
time
from
six
import
xrange
SMALL
=
0.1
SMALL
=
0.1
...
...
greentest/test_queue.py
View file @
d48e4d86
...
@@ -7,6 +7,7 @@ import threading
...
@@ -7,6 +7,7 @@ import threading
import
time
import
time
import
unittest
import
unittest
import
test_support
import
test_support
from
six
import
xrange
QUEUE_SIZE
=
5
QUEUE_SIZE
=
5
...
...
greentest/test_threading_2.py
View file @
d48e4d86
# testing gevent's Event, Lock, RLock, Semaphore, BoundedSemaphore with standard test_threading
# testing gevent's Event, Lock, RLock, Semaphore, BoundedSemaphore with standard test_threading
from
__future__
import
with_statement
from
__future__
import
with_statement
from
six
import
xrange
setup_
=
'''from gevent import monkey; monkey.patch_all()
setup_
=
'''from gevent import monkey; monkey.patch_all()
from gevent.event import Event
from gevent.event import Event
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment