Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r61874:1007f010c8cd
Date: 2013-02-27 20:56 -0800
http://bitbucket.org/pypy/pypy/changeset/1007f010c8cd/
Log: the caret location is an impl detail (reapplied from 2.7)
diff --git a/lib-python/3.2/test/test_traceback.py
b/lib-python/3.2/test/test_traceback.py
--- a/lib-python/3.2/test/test_traceback.py
+++ b/lib-python/3.2/test/test_traceback.py
@@ -7,6 +7,7 @@
import re
from test.support import run_unittest, Error, captured_output
from test.support import TESTFN, unlink
+from test.support import check_impl_detail
import traceback
@@ -57,8 +58,11 @@
IndentationError)
self.assertEqual(len(err), 4)
self.assertEqual(err[1].strip(), "print(2)")
- self.assertIn("^", err[2])
- self.assertEqual(err[1].find(")"), err[2].find("^"))
+ if check_impl_detail():
+ # on CPython, there is a "^" at the end of the line on PyPy,
+ # there is a "^" too, but at the start, more logically
+ self.assertIn("^", err[2])
+ self.assertEqual(err[1].find(")"), err[2].find("^"))
def test_base_exception(self):
# Test that exceptions derived from BaseException are formatted right
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit