]> granicus.if.org Git - python/commitdiff
Skip the test_nocaret test when running as jython. Jython happens to add
authorFinn Bock <bckfnn@worldonline.dk>
Wed, 6 Nov 2002 11:45:15 +0000 (11:45 +0000)
committerFinn Bock <bckfnn@worldonline.dk>
Wed, 6 Nov 2002 11:45:15 +0000 (11:45 +0000)
a caret in this case too.

Lib/test/test_traceback.py

index a0b31505a36739131b8a997e299a4bb79f247b58..dc22c752943dd4225441f8e3f97e39c5b35003dd 100644 (file)
@@ -1,7 +1,7 @@
 """Test cases for traceback module"""
 
 import unittest
-from test.test_support import run_unittest
+from test.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)