diff options
author | thatch <devnull@localhost> | 2008-09-24 20:23:55 -0700 |
---|---|---|
committer | thatch <devnull@localhost> | 2008-09-24 20:23:55 -0700 |
commit | d4608a2ea92d1af34c25ae164a760ef828610366 (patch) | |
tree | 6b3cc5d67fd079520525cb0ecfac0ad91da34ae8 /tests/test_examplefiles.py | |
parent | 52afb43cd14c7a9a63c4788c25b078994c32c146 (diff) | |
download | pygments-d4608a2ea92d1af34c25ae164a760ef828610366.tar.gz |
Make test_examplefiles show a better error when there are strange files
hanging out in the examplefiles dir.
Diffstat (limited to 'tests/test_examplefiles.py')
-rw-r--r-- | tests/test_examplefiles.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_examplefiles.py b/tests/test_examplefiles.py index 2ebb2101..ddaa53bf 100644 --- a/tests/test_examplefiles.py +++ b/tests/test_examplefiles.py @@ -27,6 +27,11 @@ def test_example_files(): try: lx = get_lexer_for_filename(absfn) except ClassNotFound: + if "_" not in fn: + raise AssertionError('file %r has no registered extension, ' + 'nor is of the form <lexer>_filename ' + 'for overriding, thus no lexer found.' + % fn) try: name, rest = fn.split("_", 1) lx = get_lexer_by_name(name) |