summaryrefslogtreecommitdiff
path: root/tests/test_examplefiles.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-01-09 17:28:59 +0100
committerGeorg Brandl <georg@python.org>2014-01-09 17:28:59 +0100
commit5e18204f68d92d3926ea43b85bccc49dc3ab57d1 (patch)
treee8c9b843259df6eaab51647012a32f3d9a3140dc /tests/test_examplefiles.py
parentf18a03187c7ddaec0330ece20bbfef1b116f31ac (diff)
parente6aa1888047f589f1f57e417702ed01683869214 (diff)
downloadpygments-5e18204f68d92d3926ea43b85bccc49dc3ab57d1.tar.gz
Merged in thomasvandoren/pygments-main (pull request #256)
Diffstat (limited to 'tests/test_examplefiles.py')
-rw-r--r--tests/test_examplefiles.py5
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, '