summaryrefslogtreecommitdiff
path: root/tests/test_examplefiles.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-01-09 17:35:34 +0100
committerGeorg Brandl <georg@python.org>2014-01-09 17:35:34 +0100
commitbd5ae968ec3442d12e7a6d453c7973145d364ba0 (patch)
treecfbe4b22b8d8591d5f0e2a43dcf67d36aff6d39f /tests/test_examplefiles.py
parentad252410a347ad13c8206c8c9fa0a9e33632e10f (diff)
parentdbcb3df465137d3645a1cea00184fbb55af1d141 (diff)
downloadpygments-bd5ae968ec3442d12e7a6d453c7973145d364ba0.tar.gz
Merged in j3lamp/pygments-main (pull request #206)
Fix for Issue #875
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, '