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
17468451
Commit
17468451
authored
Dec 01, 2010
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test case for memory leak fixed in 1637:51f0fddafa98 by Ned Rockson
parent
89a243c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
greentest/test__memleak.py
greentest/test__memleak.py
+49
-0
No files found.
greentest/test__memleak.py
0 → 100644
View file @
17468451
import
sys
from
greentest
import
TestCase
,
main
import
gevent
from
gevent.timeout
import
Timeout
class
TestQueue
(
TestCase
):
def
test
(
self
):
result
=
''
try
:
Timeout
.
start_new
(
0.01
)
gevent
.
sleep
(
1
)
raise
AssertionError
(
'must raise Timeout'
)
except
KeyboardInterrupt
:
raise
except
:
pass
result
+=
'%s '
%
sys
.
gettotalrefcount
()
try
:
Timeout
.
start_new
(
0.01
)
gevent
.
sleep
(
1
)
raise
AssertionError
(
'must raise Timeout'
)
except
KeyboardInterrupt
:
raise
except
:
pass
result
+=
'%s '
%
sys
.
gettotalrefcount
()
try
:
Timeout
.
start_new
(
0.01
)
gevent
.
sleep
(
1
)
raise
AssertionError
(
'must raise Timeout'
)
except
KeyboardInterrupt
:
raise
except
:
pass
result
+=
'%s'
%
sys
.
gettotalrefcount
()
a
,
b
,
c
=
result
.
split
()
assert
b
==
c
,
'total refcount mismatch: %s'
%
result
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