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
b48db7d1
Commit
b48db7d1
authored
Feb 08, 2014
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #385 from fantix/renamings
Refs #38, fixed renamed symbols in PY3
parents
cecf4efe
873f9909
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
22 deletions
+48
-22
gevent/backdoor.py
gevent/backdoor.py
+6
-2
greentest/lock_tests.py
greentest/lock_tests.py
+8
-2
greentest/monkey_test.py
greentest/monkey_test.py
+7
-4
greentest/test__pywsgi.py
greentest/test__pywsgi.py
+5
-2
greentest/test__refcount.py
greentest/test__refcount.py
+4
-1
greentest/test__threading_vs_settrace.py
greentest/test__threading_vs_settrace.py
+5
-2
greentest/test_threading_2.py
greentest/test_threading_2.py
+13
-9
No files found.
gevent/backdoor.py
View file @
b48db7d1
...
@@ -71,8 +71,12 @@ class SocketConsole(Greenlet):
...
@@ -71,8 +71,12 @@ class SocketConsole(Greenlet):
# __builtin__.__dict__ in the latter case typing
# __builtin__.__dict__ in the latter case typing
# locals() at the backdoor prompt spews out lots of
# locals() at the backdoor prompt spews out lots of
# useless stuff
# useless stuff
import
__builtin__
try
:
console
.
locals
[
"__builtins__"
]
=
__builtin__
import
__builtin__
console
.
locals
[
"__builtins__"
]
=
__builtin__
except
ImportError
:
import
builtins
console
.
locals
[
"builtins"
]
=
builtins
console
.
interact
(
banner
=
self
.
banner
)
console
.
interact
(
banner
=
self
.
banner
)
except
SystemExit
:
# raised by quit()
except
SystemExit
:
# raised by quit()
sys
.
exc_clear
()
sys
.
exc_clear
()
...
...
greentest/lock_tests.py
View file @
b48db7d1
...
@@ -3,11 +3,17 @@ Various tests for synchronization primitives.
...
@@ -3,11 +3,17 @@ Various tests for synchronization primitives.
"""
"""
import
sys
import
sys
import
time
import
time
from
thread
import
start_new_thread
,
get_ident
try
:
from
thread
import
start_new_thread
,
get_ident
except
ImportError
:
from
_thread
import
start_new_thread
,
get_ident
import
threading
import
threading
import
unittest
import
unittest
from
test
import
test_support
as
support
try
:
from
test
import
support
except
ImportError
:
from
test
import
test_support
as
support
def
_wait
():
def
_wait
():
...
...
greentest/monkey_test.py
View file @
b48db7d1
...
@@ -17,12 +17,15 @@ print('Running with patch_all(%s): %s' % (','.join('%s=%r' % x for x in kwargs.i
...
@@ -17,12 +17,15 @@ print('Running with patch_all(%s): %s' % (','.join('%s=%r' % x for x in kwargs.i
from
gevent
import
monkey
;
monkey
.
patch_all
(
**
kwargs
)
from
gevent
import
monkey
;
monkey
.
patch_all
(
**
kwargs
)
from
patched_tests_setup
import
disable_tests_in_source
from
patched_tests_setup
import
disable_tests_in_source
import
test.test_support
try
:
test
.
test_support
.
is_resource_enabled
=
lambda
*
args
:
True
from
test
import
support
del
test
.
test_support
.
use_resources
except
ImportError
:
from
test
import
test_support
as
support
support
.
is_resource_enabled
=
lambda
*
args
:
True
del
support
.
use_resources
if
sys
.
version_info
[:
2
]
<=
(
2
,
6
):
if
sys
.
version_info
[:
2
]
<=
(
2
,
6
):
test
.
test_
support
.
TESTFN
+=
'_%s'
%
os
.
getpid
()
support
.
TESTFN
+=
'_%s'
%
os
.
getpid
()
__file__
=
os
.
path
.
join
(
os
.
getcwd
(),
test_filename
)
__file__
=
os
.
path
.
join
(
os
.
getcwd
(),
test_filename
)
...
...
greentest/test__pywsgi.py
View file @
b48db7d1
...
@@ -24,7 +24,10 @@ monkey.patch_all(thread=False)
...
@@ -24,7 +24,10 @@ monkey.patch_all(thread=False)
import
cgi
import
cgi
import
os
import
os
import
sys
import
sys
import
StringIO
try
:
from
StringIO
import
StringIO
except
ImportError
:
from
io
import
StringIO
try
:
try
:
from
wsgiref.validate
import
validator
from
wsgiref.validate
import
validator
except
ImportError
:
except
ImportError
:
...
@@ -1161,7 +1164,7 @@ class TestInputRaw(greentest.BaseTestCase):
...
@@ -1161,7 +1164,7 @@ class TestInputRaw(greentest.BaseTestCase):
data
=
chunk_encode
(
data
)
data
=
chunk_encode
(
data
)
chunked_input
=
True
chunked_input
=
True
return
Input
(
StringIO
.
StringIO
(
data
),
content_length
=
content_length
,
chunked_input
=
chunked_input
)
return
Input
(
StringIO
(
data
),
content_length
=
content_length
,
chunked_input
=
chunked_input
)
def
test_short_post
(
self
):
def
test_short_post
(
self
):
i
=
self
.
make_input
(
"1"
,
content_length
=
2
)
i
=
self
.
make_input
(
"1"
,
content_length
=
2
)
...
...
greentest/test__refcount.py
View file @
b48db7d1
...
@@ -36,7 +36,10 @@ import greentest
...
@@ -36,7 +36,10 @@ import greentest
from
gevent
import
monkey
;
monkey
.
patch_all
()
from
gevent
import
monkey
;
monkey
.
patch_all
()
from
pprint
import
pformat
from
pprint
import
pformat
from
thread
import
start_new_thread
try
:
from
thread
import
start_new_thread
except
ImportError
:
from
_thread
import
start_new_thread
from
time
import
sleep
from
time
import
sleep
import
weakref
import
weakref
import
gc
import
gc
...
...
greentest/test__threading_vs_settrace.py
View file @
b48db7d1
...
@@ -79,5 +79,8 @@ class ThreadTrace(unittest.TestCase):
...
@@ -79,5 +79,8 @@ class ThreadTrace(unittest.TestCase):
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
import
test.test_support
try
:
test
.
test_support
.
run_unittest
(
ThreadTrace
)
from
test
import
support
except
ImportError
:
from
test
import
test_support
as
support
support
.
run_unittest
(
ThreadTrace
)
greentest/test_threading_2.py
View file @
b48db7d1
...
@@ -31,8 +31,12 @@ setup_4 = '\n'.join(' %s' % line for line in setup_.split('\n'))
...
@@ -31,8 +31,12 @@ setup_4 = '\n'.join(' %s' % line for line in setup_.split('\n'))
setup_5
=
'
\
n
'
.
join
(
' %s'
%
line
for
line
in
setup_
.
split
(
'
\
n
'
))
setup_5
=
'
\
n
'
.
join
(
' %s'
%
line
for
line
in
setup_
.
split
(
'
\
n
'
))
import
test.test_support
try
:
from
test.test_support
import
verbose
from
test
import
support
from
test.support
import
verbose
except
ImportError
:
from
test
import
test_support
as
support
from
test.test_support
import
verbose
import
random
import
random
import
re
import
re
import
sys
import
sys
...
@@ -539,13 +543,13 @@ class BoundedSemaphoreTests(lock_tests.BoundedSemaphoreTests):
...
@@ -539,13 +543,13 @@ class BoundedSemaphoreTests(lock_tests.BoundedSemaphoreTests):
def
main
():
def
main
():
test
.
test_
support
.
run_unittest
(
LockTests
,
RLockTests
,
EventTests
,
support
.
run_unittest
(
LockTests
,
RLockTests
,
EventTests
,
ConditionAsRLockTests
,
ConditionTests
,
ConditionAsRLockTests
,
ConditionTests
,
SemaphoreTests
,
BoundedSemaphoreTests
,
SemaphoreTests
,
BoundedSemaphoreTests
,
ThreadTests
,
ThreadTests
,
ThreadJoinOnShutdown
,
ThreadJoinOnShutdown
,
ThreadingExceptionTests
,
ThreadingExceptionTests
,
)
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
main
()
main
()
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