File: validator_creation.py

package info (click to toggle)
python-jsonschema 4.19.2-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,584 kB
  • sloc: python: 7,830; 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)