Skip to content

Commit e302c24

Browse files
committed
Add pytest-benchmark and port introspectionFromSchema-benchmark.js
1 parent da6d040 commit e302c24

File tree

7 files changed

+13207
-78
lines changed

7 files changed

+13207
-78
lines changed

poetry.lock

+23-77
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ sphinx_rtd_theme = ">=0.4"
4545
check-manifest = ">=0.39"
4646
bump2version = ">=0.5"
4747
tox = "^3.13"
48+
pytest-benchmark = "^3.2"
4849

4950
[tool.black]
5051
target-version = ['py36', 'py37', 'py38']

setup.cfg

+5
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@ python-tag = py3
33

44
[aliases]
55
test = pytest
6+
7+
[tool:pytest]
8+
# Only run benchmarks as tests.
9+
# To actually run the benchmarks, use --benchmark-enable on the command line.
10+
addopts = --benchmark-disable

tests/fixtures/__init__.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from pytest import fixture # type: ignore
66

7-
__all__ = ["kitchen_sink_query", "kitchen_sink_sdl"]
7+
__all__ = ["kitchen_sink_query", "kitchen_sink_sdl", "big_schema_sdl"]
88

99

1010
def read_graphql(name):
@@ -20,3 +20,8 @@ def kitchen_sink_query():
2020
@fixture(scope="module")
2121
def kitchen_sink_sdl():
2222
return read_graphql("schema_kitchen_sink")
23+
24+
25+
@fixture(scope="module")
26+
def big_schema_sdl():
27+
return read_graphql("github_schema")

0 commit comments

Comments
 (0)