diff options
author | Tim Hatch <tim@timhatch.com> | 2014-10-15 13:13:02 -0700 |
---|---|---|
committer | Tim Hatch <tim@timhatch.com> | 2014-10-15 13:13:02 -0700 |
commit | 7c7eeb284cf14d765a9fea846947d6103c6bd1e5 (patch) | |
tree | 22ebc74557ded6a79fd64e2e766dfe5ae0982030 | |
parent | b51bfe6f6c9b69605117ef01bfaeab71e4dabf37 (diff) | |
download | pygments-7c7eeb284cf14d765a9fea846947d6103c6bd1e5.tar.gz |
Skip known-failing tests on Jython
-rw-r--r-- | tests/test_examplefiles.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/test_examplefiles.py b/tests/test_examplefiles.py index ac5b4244..faa200fe 100644 --- a/tests/test_examplefiles.py +++ b/tests/test_examplefiles.py @@ -18,14 +18,20 @@ from pygments.lexers import get_lexer_for_filename, get_lexer_by_name from pygments.token import Error from pygments.util import ClassNotFound +import support + STORE_OUTPUT = False STATS = {} TESTDIR = os.path.dirname(__file__) +# Jython generates a StackOverflowError for repetitions of the form (a|b)+, +# which are commonly used in string patterns, when matching more than about 1000 +# chars. These tests do not complete. See http://bugs.jython.org/issue1965 +BAD_FILES_FOR_JYTHON = ('Object.st', 'all.nit', 'genclass.clj', + 'ragel-cpp_rlscan') -# generate methods def test_example_files(): global STATS STATS = {} @@ -78,6 +84,8 @@ def test_example_files(): def check_lexer(lx, fn): + if os.name == 'java' and fn in BAD_FILES_FOR_JYTHON: + raise support.SkipTest absfn = os.path.join(TESTDIR, 'examplefiles', fn) with open(absfn, 'rb') as fp: text = fp.read() |