summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2011-05-14 11:51:18 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2011-05-14 11:51:18 (GMT)
commit07352b084c725396bd74cef7c8204d16c4ab4a25 (patch)
tree6fd07b491657f3fa771d95cb629af3ba3c402699 /Lib
parent132bcf472419b5bbdecb492676df961731bc2175 (diff)
downloadcpython-07352b084c725396bd74cef7c8204d16c4ab4a25.zip
cpython-07352b084c725396bd74cef7c8204d16c4ab4a25.tar.gz
cpython-07352b084c725396bd74cef7c8204d16c4ab4a25.tar.bz2
Update __all__ and docstring.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/support.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/support.py b/Lib/test/support.py
index b1ca9dd..0cc8c31 100644
--- a/Lib/test/support.py
+++ b/Lib/test/support.py
@@ -37,6 +37,7 @@ __all__ = [
"findfile", "sortdict", "check_syntax_error", "open_urlresource",
"check_warnings", "CleanImport", "EnvironmentVarGuard",
"TransientResource", "captured_output", "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",
@@ -891,7 +892,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)
@@ -916,6 +917,7 @@ def captured_stderr():
def captured_stdin():
return captured_output("stdin")
+
def gc_collect():
"""Force as many objects as possible to be collected.