diff options
author | Georg Brandl <georg@python.org> | 2014-01-09 17:28:59 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-01-09 17:28:59 +0100 |
commit | 5e18204f68d92d3926ea43b85bccc49dc3ab57d1 (patch) | |
tree | e8c9b843259df6eaab51647012a32f3d9a3140dc /tests/test_examplefiles.py | |
parent | f18a03187c7ddaec0330ece20bbfef1b116f31ac (diff) | |
parent | e6aa1888047f589f1f57e417702ed01683869214 (diff) | |
download | pygments-5e18204f68d92d3926ea43b85bccc49dc3ab57d1.tar.gz |
Merged in thomasvandoren/pygments-main (pull request #256)
Diffstat (limited to 'tests/test_examplefiles.py')
-rw-r--r-- | tests/test_examplefiles.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_examplefiles.py b/tests/test_examplefiles.py index d785cf3b..c3e3b2f7 100644 --- a/tests/test_examplefiles.py +++ b/tests/test_examplefiles.py @@ -31,10 +31,13 @@ def test_example_files(): absfn = os.path.join(testdir, 'examplefiles', fn) if not os.path.isfile(absfn): continue + + code = open(absfn).read() + outfn = os.path.join(outdir, fn) try: - lx = get_lexer_for_filename(absfn) + lx = get_lexer_for_filename(absfn, code=code) except ClassNotFound: if "_" not in fn: raise AssertionError('file %r has no registered extension, ' |