Author: Armin Rigo <ar...@tunes.org>
Branch: py3.5
Changeset: r88935:f715c203cac3
Date: 2016-12-07 14:13 +0100
http://bitbucket.org/pypy/pypy/changeset/f715c203cac3/

Log:    fix some tests and make others fail for a good reason

diff --git a/lib-python/3/test/test_exceptions.py 
b/lib-python/3/test/test_exceptions.py
--- a/lib-python/3/test/test_exceptions.py
+++ b/lib-python/3/test/test_exceptions.py
@@ -1049,6 +1049,7 @@
                 obj = test_class()
                 with captured_stderr() as stderr:
                     del obj
+                    gc_collect()
                 report = stderr.getvalue()
                 self.assertIn("Exception ignored", report)
                 if test_class is BrokenRepr:
@@ -1059,7 +1060,12 @@
                 self.assertIn("raise exc", report)
                 if test_class is BrokenExceptionDel:
                     self.assertIn("BrokenStrException", report)
-                    self.assertIn("<exception str() failed>", report)
+                    if check_impl_detail(pypy=False):
+                        self.assertIn("<exception str() failed>", report)
+                    else:
+                        # pypy: this is what lib-python's traceback.py gives
+                        self.assertIn("<unprintable BrokenExceptionDel 
object>",
+                                      report)
                 else:
                     self.assertIn("ValueError", report)
                     self.assertIn("del is broken", report)
@@ -1081,7 +1087,12 @@
                 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=False):
+                        self.assertIn("<exception str() failed>", report)
+                    else:
+                        # pypy: this is what lib-python's traceback.py gives
+                        self.assertIn("<unprintable BrokenStrException 
object>",
+                                      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

Reply via email to