summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-04-03 15:12:41 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-04-03 15:12:41 (GMT)
commit9f8a8910a415e31808debe6e9fed7f7c3638d42a (patch)
treeffa59e04328fee48f702a8f1ec628a8a83e7b881 /Lib/test
parent72dcb0a7658c6dd99c2798b515c76e8cb311dbf6 (diff)
downloadcpython-9f8a8910a415e31808debe6e9fed7f7c3638d42a.zip
cpython-9f8a8910a415e31808debe6e9fed7f7c3638d42a.tar.gz
cpython-9f8a8910a415e31808debe6e9fed7f7c3638d42a.tar.bz2
Escaped backslashes in docstrings.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/support/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index 75fff21..1ec3178 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -1379,7 +1379,7 @@ def captured_stdout():
with captured_stdout() as stdout:
print("hello")
- self.assertEqual(stdout.getvalue(), "hello\n")
+ self.assertEqual(stdout.getvalue(), "hello\\n")
"""
return captured_output("stdout")
@@ -1388,7 +1388,7 @@ def captured_stderr():
with captured_stderr() as stderr:
print("hello", file=sys.stderr)
- self.assertEqual(stderr.getvalue(), "hello\n")
+ self.assertEqual(stderr.getvalue(), "hello\\n")
"""
return captured_output("stderr")
@@ -1396,7 +1396,7 @@ def captured_stdin():
"""Capture the input to sys.stdin:
with captured_stdin() as stdin:
- stdin.write('hello\n')
+ stdin.write('hello\\n')
stdin.seek(0)
# call test code that consumes from sys.stdin
captured = input()