summaryrefslogtreecommitdiff
path: root/tests/test_examplefiles.py
diff options
context:
space:
mode:
authorgbrandl <devnull@localhost>2009-03-31 10:26:55 -0500
committergbrandl <devnull@localhost>2009-03-31 10:26:55 -0500
commit7b95efab48d9ec79e995bf4d6db10fd049e3395a (patch)
tree48fc9b840dab83976a85af85d1c705dbaa051a0b /tests/test_examplefiles.py
parentf12c878ed096137c91658a0f62f0070e08c2afea (diff)
downloadpygments-7b95efab48d9ec79e995bf4d6db10fd049e3395a.tar.gz
Port Pygments to Python 3.1.
Diffstat (limited to 'tests/test_examplefiles.py')
-rw-r--r--tests/test_examplefiles.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_examplefiles.py b/tests/test_examplefiles.py
index c6867b9e..d64756ff 100644
--- a/tests/test_examplefiles.py
+++ b/tests/test_examplefiles.py
@@ -13,7 +13,7 @@ import unittest
from pygments import highlight
from pygments.lexers import get_lexer_for_filename, get_lexer_by_name
from pygments.token import Error
-from pygments.util import ClassNotFound
+from pygments.util import ClassNotFound, b
# generate methods
@@ -40,8 +40,8 @@ def test_example_files():
yield check_lexer, lx, absfn
def check_lexer(lx, absfn):
- text = open(absfn, 'U').read()
- text = text.strip('\n') + '\n'
+ text = open(absfn, 'rb').read()
+ text = text.strip(b('\n')) + b('\n')
try:
text = text.decode('utf-8')
except UnicodeError: