Skip to content

Commit cd61f62

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent d497f9b commit cd61f62

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

jsonschema_lexer/tests/test_integration.py

+10-8
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,33 @@
22
JSON Schema Lexer tests
33
"""
44

5+
from pygments.token import Token
56
import pytest
67

7-
from pygments.token import Token
88
from jsonschema_lexer.lexer import JSONSchemaLexer
99

1010
# Test helpers.
1111

12-
@pytest.fixture
12+
13+
@pytest.fixture()
1314
def lexer():
14-
yield JSONSchemaLexer()
15+
return JSONSchemaLexer()
1516

1617

17-
@pytest.fixture
18+
@pytest.fixture()
1819
def data_types():
19-
yield JSONSchemaLexer().parsed_data_types
20+
return JSONSchemaLexer().parsed_data_types
2021

2122

22-
@pytest.fixture
23+
@pytest.fixture()
2324
def keywords():
24-
yield JSONSchemaLexer().parsed_keywords
25+
return JSONSchemaLexer().parsed_keywords
2526

2627

2728
def assert_single_token(lexer, s, token):
2829
"""Show that a given string generates only one token."""
2930
tokens = list(lexer.get_tokens_unprocessed(s))
30-
assert len(tokens) == 1 and s==tokens[0][2] and token==tokens[0][1]
31+
assert len(tokens) == 1 and s == tokens[0][2] and token == tokens[0][1]
3132

3233

3334
def assert_tokens(lexer, string, expected_tokens):
@@ -39,6 +40,7 @@ def assert_tokens(lexer, string, expected_tokens):
3940

4041
# Tests
4142

43+
4244
def test_it_imports():
4345
import jsonschema_lexer # noqa: F401
4446

0 commit comments

Comments
 (0)