Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
623138c1
Commit
623138c1
authored
Jul 29, 2014
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #11453, #18174: Fix leak of file descriptor in test_asyncore
parent
0970657f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
Lib/test/test_asyncore.py
Lib/test/test_asyncore.py
+4
-0
No files found.
Lib/test/test_asyncore.py
View file @
623138c1
...
...
@@ -440,6 +440,8 @@ class FileWrapperTest(unittest.TestCase):
# Issue #11453
fd
=
os
.
open
(
support
.
TESTFN
,
os
.
O_RDONLY
)
f
=
asyncore
.
file_wrapper
(
fd
)
os
.
close
(
fd
)
with
support
.
check_warnings
((
''
,
ResourceWarning
)):
f
=
None
support
.
gc_collect
()
...
...
@@ -447,6 +449,8 @@ class FileWrapperTest(unittest.TestCase):
def
test_close_twice
(
self
):
fd
=
os
.
open
(
support
.
TESTFN
,
os
.
O_RDONLY
)
f
=
asyncore
.
file_wrapper
(
fd
)
os
.
close
(
fd
)
f
.
close
()
self
.
assertEqual
(
f
.
fd
,
-
1
)
# calling close twice should not fail
...
...
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