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
24685bcf
Commit
24685bcf
authored
May 15, 2010
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a test case exposing issue #24. Thanks to Ted Suzman.
http://code.google.com/p/gevent/issues/detail?id=24
parent
5bb09bbc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
greentest/test__threading_patched_local.py
greentest/test__threading_patched_local.py
+21
-0
No files found.
greentest/test__threading_patched_local.py
0 → 100644
View file @
24685bcf
from
gevent
import
monkey
;
monkey
.
patch_all
()
import
threading
localdata
=
threading
.
local
()
localdata
.
x
=
"hello"
success
=
[]
def
func
():
try
:
localdata
.
x
raise
AssertionError
(
'localdata.x must raise AttributeError'
)
except
AttributeError
:
pass
assert
localdata
.
__dict__
==
{},
localdata
.
__dict__
success
.
append
(
1
)
t
=
threading
.
Thread
(
None
,
func
)
t
.
start
()
t
.
join
()
assert
success
==
[
1
],
'test failed'
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