summaryrefslogtreecommitdiff
path: root/tests/test_examplefiles.py
diff options
context:
space:
mode:
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, '