summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-07-30 14:14:42 (GMT)
committerGeorg Brandl <georg@python.org>2010-07-30 14:14:42 (GMT)
commit3e67c5c52e644876d741b6cec4e36953a7ef3c21 (patch)
tree96f333b5f2774f07637d3e49090b3bca10a4abca
parent19746cb322095a82f9792bc6806ba66dcc886973 (diff)
downloadcpython-3e67c5c52e644876d741b6cec4e36953a7ef3c21.zip
cpython-3e67c5c52e644876d741b6cec4e36953a7ef3c21.tar.gz
cpython-3e67c5c52e644876d741b6cec4e36953a7ef3c21.tar.bz2
Revert r83267, as it breaks a few doctests and generally leads to ugly truncated output.
-rwxr-xr-xLib/pdb.py4
-rw-r--r--Lib/test/test_pdb.py27
2 files changed, 2 insertions, 29 deletions
diff --git a/Lib/pdb.py b/Lib/pdb.py
index 79a36a6..0751c17 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -237,7 +237,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
if type(t) == type(''):
exc_type_name = t
else: exc_type_name = t.__name__
- print >>self.stdout, '***', exc_type_name + ':', _saferepr(v)
+ print >>self.stdout, '***', exc_type_name + ':', v
def precmd(self, line):
"""Handle alias expansion and ';;' separator."""
@@ -753,7 +753,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
if isinstance(t, str):
exc_type_name = t
else: exc_type_name = t.__name__
- print >>self.stdout, '***', exc_type_name + ':', _saferepr(v)
+ print >>self.stdout, '***', exc_type_name + ':', repr(v)
raise
def do_p(self, arg):
diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py
index 0ef525e..ce64d17 100644
--- a/Lib/test/test_pdb.py
+++ b/Lib/test/test_pdb.py
@@ -126,33 +126,6 @@ def test_pdb_skip_modules_with_callback():
"""
-def test_pdb_unicode_exception():
- r"""This tests exceptions that cannot be displayed due to Unicode issues.
- http://bugs.python.org/issue7539
-
- >>> def test_function():
- ... import pdb; pdb.Pdb().set_trace()
- ... pass
-
- >>> def raising_function():
- ... raise ValueError(u"\xff")
-
- >>> with PdbTestInput([
- ... 'raising_function()',
- ... 'p raising_function()',
- ... 'continue',
- ... ]):
- ... test_function()
- > <doctest test.test_pdb.test_pdb_unicode_exception[0]>(3)test_function()
- -> pass
- (Pdb) raising_function()
- *** ValueError: ValueError(u'\xff',)
- (Pdb) p raising_function()
- *** ValueError: ValueError(u'\xff',)
- (Pdb) continue
- """
-
-
def test_main():
from test import test_pdb
test_support.run_doctest(test_pdb, verbosity=True)