r83282 - in python/branches/release27-maint/Lib: pdb.py test/test_pdb.py
![](https://secure.gravatar.com/avatar/8ac615df352a970211b0e3d94a307c6d.jpg?s=120&d=mm&r=g)
Author: georg.brandl Date: Fri Jul 30 16:14:42 2010 New Revision: 83282 Log: Revert r83267, as it breaks a few doctests and generally leads to ugly truncated output. Modified: python/branches/release27-maint/Lib/pdb.py python/branches/release27-maint/Lib/test/test_pdb.py Modified: python/branches/release27-maint/Lib/pdb.py ============================================================================== --- python/branches/release27-maint/Lib/pdb.py (original) +++ python/branches/release27-maint/Lib/pdb.py Fri Jul 30 16:14:42 2010 @@ -237,7 +237,7 @@ 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 @@ 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): Modified: python/branches/release27-maint/Lib/test/test_pdb.py ============================================================================== --- python/branches/release27-maint/Lib/test/test_pdb.py (original) +++ python/branches/release27-maint/Lib/test/test_pdb.py Fri Jul 30 16:14:42 2010 @@ -126,33 +126,6 @@ """ -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)
participants (1)
-
georg.brandl