summaryrefslogtreecommitdiff
path: root/tests/test_util.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2020-02-29 15:45:08 +0100
committerGitHub <noreply@github.com>2020-02-29 15:45:08 +0100
commit35544e2fc6eed0ce4a27ec7285aac71ff0ddc473 (patch)
tree4390507bf0d4d5a4596cfc57c575da12f9da40f9 /tests/test_util.py
parent14fc057d300102d88a07eda5558f238d49dd23f6 (diff)
downloadpygments-git-35544e2fc6eed0ce4a27ec7285aac71ff0ddc473.tar.gz
Remove Python 2 compatibility (#1348)
* Remove Python 2 compatibility * remove 2/3 shims in pygments.util * update setup.py metadata * Remove unneeded object inheritance. * Remove unneeded future imports.
Diffstat (limited to 'tests/test_util.py')
-rw-r--r--tests/test_util.py15
1 files changed, 2 insertions, 13 deletions
diff --git a/tests/test_util.py b/tests/test_util.py
index aa7b7acb..94985a25 100644
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -14,7 +14,7 @@ from pytest import raises
from pygments import util, console
-class FakeLexer(object):
+class FakeLexer:
def analyse(text):
return text
analyse = util.make_analysator(analyse)
@@ -81,7 +81,7 @@ def test_analysator_returns_boolean():
def test_analysator_raises_exception():
# If an analysator wrapped by make_analysator raises an exception,
# then the wrapper will return 0.0.
- class ErrorLexer(object):
+ class ErrorLexer:
def analyse(text):
raise RuntimeError('something bad happened')
analyse = util.make_analysator(analyse)
@@ -193,17 +193,6 @@ def test_guess_decode_from_terminal():
assert s == (u'\xff', 'utf-8')
-def test_add_metaclass():
- class Meta(type):
- pass
-
- @util.add_metaclass(Meta)
- class Cls:
- pass
-
- assert type(Cls) is Meta
-
-
def test_console_ansiformat():
f = console.ansiformat
c = console.codes