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
886ae3de
Commit
886ae3de
authored
Dec 18, 2013
by
Fantix King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use six.xrange in tests.
parent
567277f2
Changes
10
Hide 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 @
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
greentest/test__backdoor.py
View file @
886ae3de
...
...
@@ -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
):
...
...
greentest/test__event.py
View file @
886ae3de
import
greentest
import
gevent
from
gevent.event
import
Event
,
AsyncResult
from
six
import
xrange
DELAY
=
0.01
...
...
greentest/test__order.py
View file @
886ae3de
import
gevent
import
greentest
from
six
import
xrange
class
appender
(
object
):
...
...
greentest/test__socket_dns.py
View file @
886ae3de
...
...
@@ -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
...
...
greentest/test__subprocess_interrupted.py
View file @
886ae3de
import
sys
from
six
import
xrange
if
'runtestcase'
in
sys
.
argv
[
1
:]:
...
...
greentest/test_close_backend_fd.py
View file @
886ae3de
import
os
import
gevent
from
gevent
import
core
from
six
import
xrange
for
count
in
xrange
(
2
):
...
...
greentest/test_hub_join_timeout.py
View file @
886ae3de
...
...
@@ -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
...
...
greentest/test_queue.py
View file @
886ae3de
...
...
@@ -7,6 +7,7 @@ import threading
import
time
import
unittest
import
test_support
from
six
import
xrange
QUEUE_SIZE
=
5
...
...
greentest/test_threading_2.py
View file @
886ae3de
# 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
...
...
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