diff options
author | Georg Brandl <georg@python.org> | 2021-01-18 21:38:53 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2021-01-20 10:52:51 +0100 |
commit | dc9bf0c256dbd88c72349822d59b25f9d8225dc6 (patch) | |
tree | 5ead8cd9fd013a4ad132d258b6ba8c7f5a5cc1c7 /tests/test_mysql.py | |
parent | 91474bd6788c6c3124edba1a09fa20860200c92a (diff) | |
download | pygments-git-dc9bf0c256dbd88c72349822d59b25f9d8225dc6.tar.gz |
tests: code style fixups
Diffstat (limited to 'tests/test_mysql.py')
-rw-r--r-- | tests/test_mysql.py | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/tests/test_mysql.py b/tests/test_mysql.py index c71cfb45..845440b9 100644 --- a/tests/test_mysql.py +++ b/tests/test_mysql.py @@ -10,16 +10,8 @@ import pytest from pygments.lexers.sql import MySqlLexer -from pygments.token import \ - Comment, \ - Keyword, \ - Literal, \ - Name, \ - Number, \ - Operator, \ - Punctuation, \ - String, \ - Text +from pygments.token import Comment, Keyword, Literal, Name, Number, Operator, \ + Punctuation, String, Text @pytest.fixture(scope='module') @@ -27,7 +19,8 @@ def lexer(): yield MySqlLexer() -@pytest.mark.parametrize('text', ('1', '22', '22 333', '22 a', '22+', '22)', '22\n333', '22\r\n333')) +@pytest.mark.parametrize('text', ('1', '22', '22 333', '22 a', '22+', '22)', + '22\n333', '22\r\n333')) def test_integer_literals_positive_match(lexer, text): """Validate that integer literals are tokenized as integers.""" token = list(lexer.get_tokens(text))[0] @@ -35,7 +28,8 @@ def test_integer_literals_positive_match(lexer, text): assert token[1] in {'1', '22'} -@pytest.mark.parametrize('text', ('1a', '1A', '1.', '1ひ', '1$', '1_', '1\u0080', '1\uffff')) +@pytest.mark.parametrize('text', ('1a', '1A', '1.', '1ひ', '1$', '1_', + '1\u0080', '1\uffff')) def test_integer_literals_negative_match(lexer, text): """Validate that non-integer texts are not matched as integers.""" assert list(lexer.get_tokens(text))[0][0] != Number.Integer |