Skip to content

Commit a1f1201

Browse files
committed
Port SDL validation benchmark
From src/validation/__tests__/validateSDL-benchmark.js
1 parent 25cf4ce commit a1f1201

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/benchmarks/test_validate_sdl.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from graphql import parse
2+
from graphql.validation.validate import validate_sdl
3+
4+
# noinspection PyUnresolvedReferences
5+
from ..fixtures import big_schema_sdl # noqa: F401
6+
7+
8+
def test_validate_sdl_document(benchmark, big_schema_sdl): # noqa: F811
9+
sdl_ast = parse(big_schema_sdl)
10+
result = benchmark(lambda: validate_sdl(sdl_ast))
11+
assert result == []

0 commit comments

Comments
 (0)