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
7248850b
Commit
7248850b
authored
Jun 29, 2011
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #12400: test_faulthandler now uses sys.__stderr__
instead of open(os.devnull, 'w')
parent
c2575d55
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
5 deletions
+1
-5
Lib/test/test_faulthandler.py
Lib/test/test_faulthandler.py
+1
-5
No files found.
Lib/test/test_faulthandler.py
View file @
7248850b
...
...
@@ -231,14 +231,12 @@ faulthandler._read_null()
self
.
assertNotEqual
(
exitcode
,
0
)
def
test_is_enabled
(
self
):
null_stderr
=
None
orig_stderr
=
sys
.
stderr
try
:
# regrtest may replace sys.stderr by io.StringIO object, but
# faulthandler.enable() requires that sys.stderr has a fileno()
# method
null_stderr
=
open
(
os
.
devnull
,
'w'
)
sys
.
stderr
=
null_stderr
sys
.
stderr
=
sys
.
__stderr__
was_enabled
=
faulthandler
.
is_enabled
()
try
:
...
...
@@ -253,8 +251,6 @@ faulthandler._read_null()
faulthandler
.
disable
()
finally
:
sys
.
stderr
=
orig_stderr
if
null_stderr
is
not
None
:
null_stderr
.
close
()
def
check_dump_traceback
(
self
,
filename
):
"""
...
...
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