From: Finn Bock Date: Wed, 6 Nov 2002 11:45:51 +0000 (+0000) Subject: Backport 1.6->1.7: Skip the test_nocaret test when running as jython. X-Git-Tag: v2.2.3c1~248 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=86411eae20697aa76939695f5e1c694c9870a451;p=thirdparty%2FPython%2Fcpython.git Backport 1.6->1.7: Skip the test_nocaret test when running as jython. Jython happens to add a caret in this case too. --- diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py index 1b0a1245445a..37387fd338ba 100644 --- a/Lib/test/test_traceback.py +++ b/Lib/test/test_traceback.py @@ -1,7 +1,7 @@ """Test cases for traceback module""" import unittest -from test_support import run_unittest +from test_support import run_unittest, is_jython import traceback @@ -32,6 +32,9 @@ class TracebackCases(unittest.TestCase): self.assert_(err[1].strip() == "return x!") 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)