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
873f9909
Commit
873f9909
authored
Feb 08, 2014
by
Fantix King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refs #38, fixed renamed symbols in PY3
parent
cecf4efe
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 @
873f9909
...
...
@@ -71,8 +71,12 @@ class SocketConsole(Greenlet):
# __builtin__.__dict__ in the latter case typing
# locals() at the backdoor prompt spews out lots of
# useless stuff
import
__builtin__
console
.
locals
[
"__builtins__"
]
=
__builtin__
try
:
import
__builtin__
console
.
locals
[
"__builtins__"
]
=
__builtin__
except
ImportError
:
import
builtins
console
.
locals
[
"builtins"
]
=
builtins
console
.
interact
(
banner
=
self
.
banner
)
except
SystemExit
:
# raised by quit()
sys
.
exc_clear
()
...
...
greentest/lock_tests.py
View file @
873f9909
...
...
@@ -3,11 +3,17 @@ Various tests for synchronization primitives.
"""
import
sys
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
unittest
from
test
import
test_support
as
support
try
:
from
test
import
support
except
ImportError
:
from
test
import
test_support
as
support
def
_wait
():
...
...
greentest/monkey_test.py
View file @
873f9909
...
...
@@ -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
patched_tests_setup
import
disable_tests_in_source
import
test.test_support
test
.
test_support
.
is_resource_enabled
=
lambda
*
args
:
True
del
test
.
test_support
.
use_resources
try
:
from
test
import
support
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
):
test
.
test_
support
.
TESTFN
+=
'_%s'
%
os
.
getpid
()
support
.
TESTFN
+=
'_%s'
%
os
.
getpid
()
__file__
=
os
.
path
.
join
(
os
.
getcwd
(),
test_filename
)
...
...
greentest/test__pywsgi.py
View file @
873f9909
...
...
@@ -24,7 +24,10 @@ monkey.patch_all(thread=False)
import
cgi
import
os
import
sys
import
StringIO
try
:
from
StringIO
import
StringIO
except
ImportError
:
from
io
import
StringIO
try
:
from
wsgiref.validate
import
validator
except
ImportError
:
...
...
@@ -1161,7 +1164,7 @@ class TestInputRaw(greentest.BaseTestCase):
data
=
chunk_encode
(
data
)
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
):
i
=
self
.
make_input
(
"1"
,
content_length
=
2
)
...
...
greentest/test__refcount.py
View file @
873f9909
...
...
@@ -36,7 +36,10 @@ import greentest
from
gevent
import
monkey
;
monkey
.
patch_all
()
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
import
weakref
import
gc
...
...
greentest/test__threading_vs_settrace.py
View file @
873f9909
...
...
@@ -79,5 +79,8 @@ class ThreadTrace(unittest.TestCase):
if
__name__
==
"__main__"
:
import
test.test_support
test
.
test_support
.
run_unittest
(
ThreadTrace
)
try
:
from
test
import
support
except
ImportError
:
from
test
import
test_support
as
support
support
.
run_unittest
(
ThreadTrace
)
greentest/test_threading_2.py
View file @
873f9909
...
...
@@ -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
'
))
import
test.test_support
from
test.test_support
import
verbose
try
:
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
re
import
sys
...
...
@@ -539,13 +543,13 @@ class BoundedSemaphoreTests(lock_tests.BoundedSemaphoreTests):
def
main
():
test
.
test_
support
.
run_unittest
(
LockTests
,
RLockTests
,
EventTests
,
ConditionAsRLockTests
,
ConditionTests
,
SemaphoreTests
,
BoundedSemaphoreTests
,
ThreadTests
,
ThreadJoinOnShutdown
,
ThreadingExceptionTests
,
)
support
.
run_unittest
(
LockTests
,
RLockTests
,
EventTests
,
ConditionAsRLockTests
,
ConditionTests
,
SemaphoreTests
,
BoundedSemaphoreTests
,
ThreadTests
,
ThreadJoinOnShutdown
,
ThreadingExceptionTests
,
)
if
__name__
==
"__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