Author: Philip Jenvey <pjen...@underboss.org> Branch: stdlib-2.7.12 Changeset: r87639:d0f070db1918 Date: 2016-10-08 16:16 -0700 http://bitbucket.org/pypy/pypy/changeset/d0f070db1918/
Log: we use traceback.py for this diff --git a/lib-python/2.7/test/test_exceptions.py b/lib-python/2.7/test/test_exceptions.py --- a/lib-python/2.7/test/test_exceptions.py +++ b/lib-python/2.7/test/test_exceptions.py @@ -6,7 +6,8 @@ import pickle, cPickle from test.test_support import (TESTFN, unlink, run_unittest, captured_stderr, - check_warnings, cpython_only, gc_collect) + check_warnings, cpython_only, gc_collect, + check_impl_detail) from test.test_pep352 import ignore_deprecation_warnings class BrokenStrException(Exception): @@ -701,7 +702,11 @@ self.assertIn("raise exc", report) self.assertIn(exc_type.__name__, report) if exc_type is BrokenStrException: - self.assertIn("<exception str() failed>", report) + if check_impl_detail(pypy=True): + # from traceback.py + self.assertIn("unprintable BrokenStrException", report) + else: + self.assertIn("<exception str() failed>", report) else: self.assertIn("test message", report) self.assertTrue(report.endswith("\n")) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit