Skip to content

Commit e4f8e8c

Browse files
committed
Fixed tests
1 parent a6efe00 commit e4f8e8c

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

graphql/execution/experimental/tests/test_benchmark.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
GraphQLInterfaceType, GraphQLList, GraphQLNonNull,
88
GraphQLObjectType, GraphQLScalarType, GraphQLSchema,
99
GraphQLString, GraphQLUnionType)
10-
from ..resolver import Fragment, type_resolver
10+
from ..fragment import Fragment
11+
from ..resolver import type_resolver
1112

1213
SIZE = 10000
1314

1415

15-
def test_querybuilder_big_list_of_ints(benchmark):
16+
def test_experimental_big_list_of_ints(benchmark):
1617
big_int_list = [x for x in range(SIZE)]
1718

1819
resolver = type_resolver(GraphQLList(GraphQLInt), lambda: big_int_list)
@@ -21,7 +22,7 @@ def test_querybuilder_big_list_of_ints(benchmark):
2122
assert result == big_int_list
2223

2324

24-
def test_querybuilder_big_list_of_nested_ints(benchmark):
25+
def test_experimental_big_list_of_nested_ints(benchmark):
2526
big_int_list = [x for x in range(SIZE)]
2627

2728
Node = GraphQLObjectType(
@@ -52,7 +53,7 @@ def test_querybuilder_big_list_of_nested_ints(benchmark):
5253
} for n in big_int_list]
5354

5455

55-
def test_querybuilder_big_list_of_objecttypes_with_two_int_fields(benchmark):
56+
def test_experimental_big_list_of_objecttypes_with_two_int_fields(benchmark):
5657
big_int_list = [x for x in range(SIZE)]
5758

5859
Node = GraphQLObjectType('Node', fields={
@@ -86,7 +87,7 @@ def test_querybuilder_big_list_of_objecttypes_with_two_int_fields(benchmark):
8687
} for n in big_int_list]
8788

8889

89-
def test_querybuilder_big_list_of_objecttypes_with_one_int_field(benchmark):
90+
def test_experimental_big_list_of_objecttypes_with_one_int_field(benchmark):
9091
big_int_list = [x for x in range(SIZE)]
9192
Node = GraphQLObjectType('Node', fields={'id': GraphQLField(GraphQLInt, resolver=lambda obj, *_, **__: obj)})
9293
Query = GraphQLObjectType(

graphql/execution/experimental/tests/test_lists.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from collections import namedtuple
22

33
from graphql.error import format_error
4-
from graphql.execution.querybuilder.executor import execute
4+
from graphql.execution.experimental.executor import execute
55
from graphql.language.parser import parse
66
from graphql.type import (GraphQLField, GraphQLInt, GraphQLList,
77
GraphQLNonNull, GraphQLObjectType, GraphQLSchema)

graphql/execution/experimental/tests/test_nonnull.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
from graphql.error import format_error
3-
from graphql.execution.querybuilder.executor import execute
3+
from graphql.execution.experimental.executor import execute
44
from graphql.language.parser import parse
55
from graphql.type import (GraphQLField, GraphQLNonNull, GraphQLObjectType,
66
GraphQLSchema, GraphQLString)

graphql/execution/experimental/tests/test_querybuilder.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# from ..querybuilder import generate_fragment, fragment_operation, QueryBuilder
1+
# from ..experimental import generate_fragment, fragment_operation, experimental
22
# from ..fragment import Fragment
33

44
# from ....language.parser import parse
@@ -117,7 +117,7 @@
117117
# id
118118
# }
119119
# }''')
120-
# query_builder = QueryBuilder(schema, document_ast)
120+
# query_builder = experimental(schema, document_ast)
121121
# QueryFragment = query_builder.get_operation_fragment('MyQuery')
122122
# node_field_asts = ast.SelectionSet(selections=[
123123
# ast.Field(
@@ -157,7 +157,7 @@
157157
# id
158158
# }
159159
# }''')
160-
# query_builder = QueryBuilder(schema, document_ast)
160+
# query_builder = experimental(schema, document_ast)
161161
# QueryFragment = query_builder.get_operation_fragment('MyQuery')
162162
# root = None
163163
# expected = {

0 commit comments

Comments
 (0)