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
1f82df1f
Commit
1f82df1f
authored
Nov 28, 2016
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test_threading --Event under new pypy standard lib. [skip appveyor]
parent
b85732ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
src/greentest/2.7pypy/lock_tests.py
src/greentest/2.7pypy/lock_tests.py
+16
-2
src/greentest/2.7pypy/test_threading.py
src/greentest/2.7pypy/test_threading.py
+1
-1
No files found.
src/greentest/2.7pypy/lock_tests.py
View file @
1f82df1f
...
...
@@ -39,8 +39,12 @@ class Bunch(object):
self
.
finished
.
append
(
tid
)
while
not
self
.
_can_exit
:
_wait
()
for
i
in
range
(
n
):
start_new_thread
(
task
,
())
try
:
for
i
in
range
(
n
):
start_new_thread
(
task
,
())
except
:
self
.
_can_exit
=
True
raise
def
wait_for_started
(
self
):
while
len
(
self
.
started
)
<
self
.
n
:
...
...
@@ -301,6 +305,16 @@ class EventTests(BaseTestCase):
for
r
,
dt
in
results2
:
self
.
assertTrue
(
r
)
def
test_reset_internal_locks
(
self
):
evt
=
self
.
eventtype
()
if
not
hasattr
(
evt
,
'_Event__cond'
)
or
sys
.
version_info
[:
3
]
<=
(
2
,
7
,
8
):
self
.
skipTest
(
"gevent: internal impl difference"
)
old_lock
=
evt
.
_Event__cond
.
_Condition__lock
evt
.
_reset_internal_locks
()
new_lock
=
evt
.
_Event__cond
.
_Condition__lock
self
.
assertIsNot
(
new_lock
,
old_lock
)
self
.
assertIs
(
type
(
new_lock
),
type
(
old_lock
))
class
ConditionTests
(
BaseTestCase
):
"""
...
...
src/greentest/2.7pypy/test_threading.py
View file @
1f82df1f
...
...
@@ -19,7 +19,7 @@ try:
except
ImportError
:
_testcapi
=
None
from
test
import
lock_tests
import
lock_tests
# gevent: use local copy
# A trivial mutable counter.
class
Counter
(
object
):
...
...
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