diff options
author | thatch <devnull@localhost> | 2008-08-14 23:39:04 -0700 |
---|---|---|
committer | thatch <devnull@localhost> | 2008-08-14 23:39:04 -0700 |
commit | 424366452ddc8619e89d3580aefb59e2bfae26b0 (patch) | |
tree | 5e6ebe5fc05e5b573c6e5154bd96621f693025e2 /tests/test_examplefiles.py | |
parent | e6e3faecd77f18ba8977ea1f8832578d683f5930 (diff) | |
parent | 3e1d51e070744961d57aba8b7b2110e3ecaddacf (diff) | |
download | pygments-424366452ddc8619e89d3580aefb59e2bfae26b0.tar.gz |
Merge Scala support from Krzysiek Goj's branch
Diffstat (limited to 'tests/test_examplefiles.py')
-rw-r--r-- | tests/test_examplefiles.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_examplefiles.py b/tests/test_examplefiles.py index ee9c78af..ee9af608 100644 --- a/tests/test_examplefiles.py +++ b/tests/test_examplefiles.py @@ -3,7 +3,7 @@ Pygments tests with example files ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - :copyright: 2006-2007 by Georg Brandl. + :copyright: 2006-2008 by Georg Brandl. :license: BSD, see LICENSE for more details. """ @@ -13,6 +13,7 @@ import unittest from pygments import highlight from pygments.lexers import get_lexer_for_filename, get_lexer_by_name from pygments.token import Error +from pygments.util import ClassNotFound class ExampleFileTest(unittest.TestCase): @@ -28,11 +29,11 @@ for fn in os.listdir(os.path.join(testdir, 'examplefiles')): try: lx = get_lexer_for_filename(absfn) - except ValueError: + except ClassNotFound: try: name, rest = fn.split("_", 1) lx = get_lexer_by_name(name) - except ValueError: + except ClassNotFound: raise AssertionError('no lexer found for file %r' % fn) def test(self, lx=lx, absfn=absfn): |