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
63db5b65
Commit
63db5b65
authored
May 14, 2011
by
Ezio Melotti
Browse files
Options
Browse Files
Download
Plain Diff
Merge with 3.2 and also remove captured_output from __all__ (see #7960).
parents
c3afbb95
07352b08
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
Lib/test/support.py
Lib/test/support.py
+4
-3
No files found.
Lib/test/support.py
View file @
63db5b65
...
...
@@ -35,8 +35,8 @@ __all__ = [
"is_resource_enabled"
,
"requires"
,
"find_unused_port"
,
"bind_port"
,
"IPV6_ENABLED"
,
"is_jython"
,
"TESTFN"
,
"HOST"
,
"SAVEDCWD"
,
"temp_cwd"
,
"findfile"
,
"sortdict"
,
"check_syntax_error"
,
"open_urlresource"
,
"check_warnings"
,
"CleanImport"
,
"EnvironmentVarGuard"
,
"
TransientResource"
,
"captured_output"
,
"captured_stdout
"
,
"time_out"
,
"check_warnings"
,
"CleanImport"
,
"EnvironmentVarGuard"
,
"TransientResource"
,
"
captured_stdout"
,
"captured_stdin"
,
"captured_stderr
"
,
"time_out"
,
"socket_peer_reset"
,
"ioerror_peer_reset"
,
"run_with_locale"
,
'temp_umask'
,
"transient_internet"
,
"set_memlimit"
,
"bigmemtest"
,
"bigaddrspacetest"
,
"BasicTestRunner"
,
"run_unittest"
,
"run_doctest"
,
"threading_setup"
,
...
...
@@ -887,7 +887,7 @@ def transient_internet(resource_name, *, timeout=30.0, errnos=()):
@
contextlib
.
contextmanager
def
captured_output
(
stream_name
):
"""Return a context manager used by captured_stdout
and captured_stdin
"""Return a context manager used by captured_stdout
/stdin/stderr
that temporarily replaces the sys stream *stream_name* with a StringIO."""
import
io
orig_stdout
=
getattr
(
sys
,
stream_name
)
...
...
@@ -912,6 +912,7 @@ def captured_stderr():
def
captured_stdin
():
return
captured_output
(
"stdin"
)
def
gc_collect
():
"""Force as many objects as possible to be collected.
...
...
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