File: validator_creation.py

package info (click to toggle)
python-jsonschema 4.25.1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 4,952 kB
  • sloc: python: 8,469; makefile: 210; sh: 12
file content (14 lines) | stat: -rw-r--r-- 285 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from pyperf import Runner

from jsonschema import Draft202012Validator

schema = {
    "type": "array",
    "minLength": 1,
    "maxLength": 1,
    "items": {"type": "integer"},
}


if __name__ == "__main__":
    Runner().bench_func("validator creation", Draft202012Validator, schema)