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
d72e5490
Commit
d72e5490
authored
Nov 30, 2018
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More tweaks for 3.7
parent
f6daa504
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
src/gevent/tests/test__fileobject.py
src/gevent/tests/test__fileobject.py
+18
-0
No files found.
src/gevent/tests/test__fileobject.py
View file @
d72e5490
...
...
@@ -183,6 +183,23 @@ class TestFileObjectThread(ConcurrentFileObjectMixin,
def
_getTargetClass
(
self
):
return
fileobject
.
FileObjectThread
def
tearDown
(
self
):
# Make sure outstanding tasks have completed.
# On Travis with Python 3.7 and libuv, test_bufsize_0
# fails in os.fdopen(), claiming the file descriptor is bad.
# This would happen if we closed (garbage collected?) a FD,
# opened a pipe and got the same int FD, and then some background
# task closed that same int FD again. FileObjectThread.close()
# goes through threadpool.apply(), which is supposed to be synchronous;
# make sure it is.
gevent
.
get_hub
().
threadpool
.
join
()
# And collect any outstanding garbage, in case some resource is "leaking"
# (We have no indication that it is, but we're flailing wildly here to try
# to understand what could be happening)
gc
.
collect
()
super
(
TestFileObjectThread
,
self
).
tearDown
()
# FileObjectThread uses os.fdopen() when passed a file-descriptor,
# which returns an object with a destructor that can't be
# bypassed, so we can't even create one that way
...
...
@@ -269,4 +286,5 @@ class TestTextMode(unittest.TestCase):
if
__name__
==
'__main__'
:
sys
.
argv
.
append
(
'-v'
)
greentest
.
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