summaryrefslogtreecommitdiff
path: root/tests/test_examplefiles.py
diff options
context:
space:
mode:
authorMatthäus G. Chajdas <dev@anteru.net>2020-09-08 20:33:25 +0200
committerMatthäus G. Chajdas <dev@anteru.net>2020-09-08 20:33:25 +0200
commit203ef1eff6daebab6f95b0b49e6e6a58168073fb (patch)
tree7defa199f48a34787f980b6400d8bbaa9380039a /tests/test_examplefiles.py
parente09d4e0cf23d7c6069ddc690942ceb4cd23fd556 (diff)
parentb2c91c70ee536b0472100d1273818f8bb45529fe (diff)
downloadpygments-git-bug/angular-html.tar.gz
Merge branch 'master' into bug/angular-htmlbug/angular-html
# Conflicts: # tests/test_shell.py
Diffstat (limited to 'tests/test_examplefiles.py')
-rw-r--r--tests/test_examplefiles.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_examplefiles.py b/tests/test_examplefiles.py
index 22b5ced0..25b355ec 100644
--- a/tests/test_examplefiles.py
+++ b/tests/test_examplefiles.py
@@ -101,8 +101,8 @@ def test_examplefile(filename):
text = text.strip(b'\n') + b'\n'
try:
text = text.decode('utf-8')
- if text.startswith(u'\ufeff'):
- text = text[len(u'\ufeff'):]
+ if text.startswith('\ufeff'):
+ text = text[len('\ufeff'):]
except UnicodeError:
text = text.decode('latin1')
ntext = []
@@ -113,13 +113,13 @@ def test_examplefile(filename):
ntext.append(val)
assert type != Error, \
'lexer %s generated error token for %s: %r at position %d' % \
- (lx, absfn, val, len(u''.join(ntext)))
+ (lx, absfn, val, len(''.join(ntext)))
tokens.append((type, val))
t2 = time.time()
STATS[os.path.basename(absfn)] = (len(text),
1000 * (t2 - t1), 1000 * (t2 - t1) / len(text))
- if u''.join(ntext) != text:
- print('\n'.join(difflib.unified_diff(u''.join(ntext).splitlines(),
+ if ''.join(ntext) != text:
+ print('\n'.join(difflib.unified_diff(''.join(ntext).splitlines(),
text.splitlines())))
raise AssertionError('round trip failed for ' + absfn)