summaryrefslogtreecommitdiffstats
path: root/Lib/doctest.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-06-04 13:01:30 (GMT)
committerGeorg Brandl <georg@python.org>2008-06-04 13:01:30 (GMT)
commita26f8ca668d09eff8ab03ef3d1cddb9bfbc6d124 (patch)
tree4b3704507702b98e0ce4107403a72093a5d6b9fc /Lib/doctest.py
parentf954c4b9fb8529cc13a2e24c58137c66ac836b28 (diff)
downloadcpython-a26f8ca668d09eff8ab03ef3d1cddb9bfbc6d124.zip
cpython-a26f8ca668d09eff8ab03ef3d1cddb9bfbc6d124.tar.gz
cpython-a26f8ca668d09eff8ab03ef3d1cddb9bfbc6d124.tar.bz2
Revert r63934 -- it was mixing two patches.
Diffstat (limited to 'Lib/doctest.py')
-rw-r--r--Lib/doctest.py16
1 files changed, 0 insertions, 16 deletions
diff --git a/Lib/doctest.py b/Lib/doctest.py
index 772e142..dad8333 100644
--- a/Lib/doctest.py
+++ b/Lib/doctest.py
@@ -1441,13 +1441,6 @@ class OutputChecker:
and returns true if they match; and `output_difference`, which
returns a string describing the differences between two outputs.
"""
-
- def _toAscii(self, s):
- """
- Convert string to hex-escaped ASCII string.
- """
- return str(s.encode('ASCII', 'backslashreplace'), "ASCII")
-
def check_output(self, want, got, optionflags):
"""
Return True iff the actual output from an example (`got`)
@@ -1458,15 +1451,6 @@ class OutputChecker:
documentation for `TestRunner` for more information about
option flags.
"""
-
- # If `want` contains hex-escaped character such as "\u1234",
- # then `want` is a string of six characters(e.g. [\,u,1,2,3,4]).
- # On the other hand, `got` could be an another sequence of
- # characters such as [\u1234], so `want` and `got` should
- # be folded to hex-escaped ASCII string to compare.
- got = self._toAscii(got)
- want = self._toAscii(want)
-
# Handle the common case first, for efficiency:
# if they're string-identical, always return true.
if got == want: