]> granicus.if.org Git - python/commitdiff
Revert r83267, as it breaks a few doctests and generally leads to ugly truncated...
authorGeorg Brandl <georg@python.org>
Fri, 30 Jul 2010 14:14:42 +0000 (14:14 +0000)
committerGeorg Brandl <georg@python.org>
Fri, 30 Jul 2010 14:14:42 +0000 (14:14 +0000)
Lib/pdb.py
Lib/test/test_pdb.py

index 79a36a631d18f4398d9fc4e9218294d5f5f11f2e..0751c17667d4bc5c4c2a27137993e5bd25c718bb 100755 (executable)
@@ -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):
index 0ef525ee1cdfeab89e723cd79f4e11e77d9168d0..ce64d171a45818a8b4ec2e2bdc8877830d7d035f 100644 (file)
@@ -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)