diff options
author | gbrandl <devnull@localhost> | 2009-03-31 10:26:55 -0500 |
---|---|---|
committer | gbrandl <devnull@localhost> | 2009-03-31 10:26:55 -0500 |
commit | 7b95efab48d9ec79e995bf4d6db10fd049e3395a (patch) | |
tree | 48fc9b840dab83976a85af85d1c705dbaa051a0b /tests/test_examplefiles.py | |
parent | f12c878ed096137c91658a0f62f0070e08c2afea (diff) | |
download | pygments-7b95efab48d9ec79e995bf4d6db10fd049e3395a.tar.gz |
Port Pygments to Python 3.1.
Diffstat (limited to 'tests/test_examplefiles.py')
-rw-r--r-- | tests/test_examplefiles.py | 6 |
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: |