Skip to content

Commit bc7ec58

Browse files
author
Daniel Gallagher
committed
Minimize diff further
1 parent 077ea2b commit bc7ec58

14 files changed

+22
-28
lines changed

graphql/execution/tests/test_subscribe.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# type: ignore
22
from collections import OrderedDict, namedtuple
3-
4-
from graphql import (GraphQLBoolean, GraphQLField, GraphQLInt, GraphQLList,
5-
GraphQLObjectType, GraphQLSchema, GraphQLString, graphql,
6-
parse, subscribe)
73
from rx import Observable, Observer
84
from rx.subjects import Subject
95
from graphql import (

graphql/execution/tests/test_variables.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import json
33
from collections import OrderedDict
44

5+
from pytest import raises
56
from graphql.error import GraphQLError, format_error
67
from graphql.execution import execute
78
from graphql.language.parser import parse
@@ -25,8 +26,6 @@
2526
# from typing import Dict
2627
# from typing import Union
2728

28-
from pytest import raises
29-
3029
TestComplexScalar = GraphQLScalarType(
3130
name="ComplexScalar",
3231
serialize=lambda v: "SerializedValue" if v == "DeserializedValue" else None,

graphql/graphql.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
from promise import promisify
2-
3-
from .backend import get_default_backend
41
from .execution import ExecutionResult
2+
from .backend import get_default_backend
53

4+
from promise import promisify
65

76
# Necessary for static type checking
87
if False: # flake8: noqa

graphql/language/tests/test_lexer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
from pytest import raises
2+
13
from graphql.error import GraphQLSyntaxError
24
from graphql.language.lexer import Lexer, Token, TokenKind
35
from graphql.language.source import Source
46

5-
from pytest import raises
6-
77

88
def lex_one(s):
99
# type: (str) -> Token

graphql/language/tests/test_parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
from pytest import raises
2+
13
from graphql.error import GraphQLSyntaxError
24
from graphql.language import ast
35
from graphql.language.location import SourceLocation
46
from graphql.language.parser import Loc, parse
57
from graphql.language.source import Source
68

7-
from pytest import raises
8-
99
from .fixtures import KITCHEN_SINK
1010

1111

graphql/language/tests/test_printer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import copy
22

3+
from pytest import raises
4+
35
from graphql.language.ast import Field, Name
46
from graphql.language.parser import parse
57
from graphql.language.printer import print_ast
68

7-
from pytest import raises
8-
99
from .fixtures import KITCHEN_SINK
1010

1111

graphql/language/tests/test_schema_parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
from pytest import raises
2+
13
from graphql import Source, parse
24
from graphql.error import GraphQLSyntaxError
35
from graphql.language import ast
46
from graphql.language.parser import Loc
57
from typing import Callable
68

7-
from pytest import raises
8-
99

1010
def create_loc_fn(body):
1111
# type: (str) -> Callable

graphql/language/tests/test_schema_printer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from copy import deepcopy
22

3+
from pytest import raises
4+
35
from graphql import parse
46
from graphql.language import ast
57
from graphql.language.printer import print_ast

graphql/pyutils/tests/test_default_ordered_dict.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import copy
22
import pickle
33

4-
from graphql.pyutils.default_ordered_dict import DefaultOrderedDict
5-
64
from pytest import raises
75

6+
from graphql.pyutils.default_ordered_dict import DefaultOrderedDict
7+
88

99
def test_will_missing_will_set_value_from_factory():
1010
d = DefaultOrderedDict(list)

graphql/type/tests/test_serialization.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
from graphql.type import GraphQLBoolean, GraphQLFloat, GraphQLInt, GraphQLString
44

5-
import pytest
6-
75

86
def test_serializes_output_int():
97
assert GraphQLInt.serialize(1) == 1

graphql/type/tests/test_validation.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
)
2020
from graphql.type.definition import GraphQLArgument
2121

22-
from pytest import raises
23-
2422
_none = lambda *args: None
2523
_true = lambda *args: True
2624
_false = lambda *args: False

graphql/utils/tests/test_build_ast_schema.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
from pytest import raises
2+
13
from graphql import GraphQLInt, parse
24
from graphql.utils.build_ast_schema import build_ast_schema
35
from graphql.utils.schema_printer import print_schema
4-
from pytest import raises
6+
57
from ...type import (
68
GraphQLDeprecatedDirective,
79
GraphQLIncludeDirective,

graphql/utils/tests/test_build_client_schema.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from collections import OrderedDict
22

3+
from pytest import raises
4+
35
from graphql import graphql
46
from graphql.error import format_error
57
from graphql.type import (
@@ -26,8 +28,6 @@
2628
from graphql.utils.build_client_schema import build_client_schema
2729
from graphql.utils.introspection_query import introspection_query
2830

29-
from pytest import raises
30-
3131
from ...pyutils.contain_subset import contain_subset
3232

3333

graphql/utils/tests/test_extend_schema.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from collections import OrderedDict
22

3+
from pytest import raises
4+
35
from graphql import parse
46
from graphql.execution import execute
57
from graphql.type import (
@@ -19,8 +21,6 @@
1921
from graphql.utils.extend_schema import extend_schema
2022
from graphql.utils.schema_printer import print_schema
2123

22-
from pytest import raises
23-
2424
# Test schema.
2525
SomeInterfaceType = GraphQLInterfaceType(
2626
name="SomeInterface",

0 commit comments

Comments
 (0)