diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/contrast/test_contrasts.py | 1 | ||||
-rw-r--r-- | tests/test_basic_api.py | 2 | ||||
-rw-r--r-- | tests/test_crystal.py | 2 | ||||
-rw-r--r-- | tests/test_html_formatter.py | 2 | ||||
-rwxr-xr-x | tests/test_usd.py | 1 | ||||
-rw-r--r-- | tests/test_words.py | 1 |
6 files changed, 3 insertions, 6 deletions
diff --git a/tests/contrast/test_contrasts.py b/tests/contrast/test_contrasts.py index cfc9b414..f43d2c0f 100644 --- a/tests/contrast/test_contrasts.py +++ b/tests/contrast/test_contrasts.py @@ -11,7 +11,6 @@ import json import os -import sys import pygments.styles import pygments.token diff --git a/tests/test_basic_api.py b/tests/test_basic_api.py index 62ea4895..e12be25e 100644 --- a/tests/test_basic_api.py +++ b/tests/test_basic_api.py @@ -49,7 +49,7 @@ def test_lexer_classes(cls): assert all(al.lower() == al for al in cls.aliases) if issubclass(cls, RegexLexer): - inst = cls(opt1="val1", opt2="val2") + cls(opt1="val1", opt2="val2") # should not raise if not hasattr(cls, '_tokens'): # if there's no "_tokens", the lexer has to be one with # multiple tokendef variants diff --git a/tests/test_crystal.py b/tests/test_crystal.py index 962d9e5f..9bc2f11a 100644 --- a/tests/test_crystal.py +++ b/tests/test_crystal.py @@ -8,7 +8,7 @@ import pytest -from pygments.token import Text, String, Number, Punctuation, Error, Whitespace +from pygments.token import String, Number, Punctuation, Error, Whitespace from pygments.lexers import CrystalLexer diff --git a/tests/test_html_formatter.py b/tests/test_html_formatter.py index e1a02b24..7b9b8015 100644 --- a/tests/test_html_formatter.py +++ b/tests/test_html_formatter.py @@ -231,7 +231,7 @@ def test_unicode_options(): def test_ctags(): try: - import ctags + import ctags # noqa: F401 except ImportError: # we can't check without the ctags module, but at least check the exception assert pytest.raises( diff --git a/tests/test_usd.py b/tests/test_usd.py index 54389832..779e3d3d 100755 --- a/tests/test_usd.py +++ b/tests/test_usd.py @@ -2,7 +2,6 @@ """Test that syntax highlighting for USD files works correctly.""" -import textwrap import unittest from pygments.lexers import UsdLexer diff --git a/tests/test_words.py b/tests/test_words.py index 9a8730ae..3b31e9b4 100644 --- a/tests/test_words.py +++ b/tests/test_words.py @@ -358,7 +358,6 @@ class MySecondLexer(RegexLexer): def test_bracket_escape(): - s = "whatever" # This used to emit a FutureWarning. assert list(MySecondLexer().get_tokens("x")) == [ (Token.Name, "x"), |