tests/benchmarks/test_validate_sdl.py
raw| 1 | from graphql import parse |
| 2 | from graphql.validation.validate import validate_sdl |
| 3 | |
| 4 | from ..fixtures import big_schema_sdl # noqa: F401 |
| 5 | |
| 6 | |
| 7 | def test_validate_sdl_document(benchmark, big_schema_sdl): # noqa: F811 |
| 8 | sdl_ast = parse(big_schema_sdl) |
| 9 | result = benchmark(lambda: validate_sdl(sdl_ast)) |
| 10 | assert result == [] |