issue232.py 521 B

12345678910111213141516171819202122232425
  1. """
  2. A performance benchmark using the example from issue #232.
  3. See https://github.com/python-jsonschema/jsonschema/pull/232.
  4. """
  5. from pathlib import Path
  6. from pyperf import Runner
  7. from referencing import Registry
  8. from jsonschema.tests._suite import Version
  9. import jsonschema
  10. issue232 = Version(
  11. path=Path(__file__).parent / "issue232",
  12. remotes=Registry(),
  13. name="issue232",
  14. )
  15. if __name__ == "__main__":
  16. issue232.benchmark(
  17. runner=Runner(),
  18. Validator=jsonschema.Draft4Validator,
  19. )