[pypy-svn] r61248 - pypy/trunk/lib-python/modified-2.5.2/test

arigo at codespeak.net arigo at codespeak.net
Thu Jan 22 16:51:26 CET 2009


Author: arigo
Date: Thu Jan 22 16:51:26 2009
New Revision: 61248

Modified:
   pypy/trunk/lib-python/modified-2.5.2/test/test_traceback.py
Log:
Restore this test, which was completely deleted in some
earlier revision which I could not find.  There is an
error, but it should probably be skipped instead of killed.


Modified: pypy/trunk/lib-python/modified-2.5.2/test/test_traceback.py
==============================================================================
--- pypy/trunk/lib-python/modified-2.5.2/test/test_traceback.py	(original)
+++ pypy/trunk/lib-python/modified-2.5.2/test/test_traceback.py	Thu Jan 22 16:51:26 2009
@@ -35,6 +35,15 @@
         self.assert_("^" in err[2]) # third line has caret
         self.assert_(err[1].find("!") == err[2].find("^")) # in the right place
 
+    def test_nocaret(self):
+        if is_jython:
+            # jython adds a caret in this case (why shouldn't it?)
+            return
+        err = self.get_exception_format(self.syntax_error_without_caret,
+                                        SyntaxError)
+        self.assert_(len(err) == 3)
+        self.assert_(err[1].strip() == "[x for x in x] = x")
+
     def test_bad_indentation(self):
         err = self.get_exception_format(self.syntax_error_bad_indentation,
                                         IndentationError)



More information about the Pypy-commit mailing list