File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414
1515from benchmarks .cases import BenchmarkCase
1616from benchmarks .cases import build_cases
17- from openapi_schema_validator .shortcuts import _clear_validate_cache
17+ from openapi_schema_validator .shortcuts import clear_validate_cache
1818from openapi_schema_validator .shortcuts import validate
1919
2020
@@ -64,7 +64,7 @@ def _measure_helper_validate_per_second(
6464 * ,
6565 check_schema : bool ,
6666) -> float :
67- _clear_validate_cache ()
67+ clear_validate_cache ()
6868 for _ in range (warmup ):
6969 validate (
7070 case .instance ,
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ To run all checks on all files, enter:
7373
7474 pre-commit run --all-files
7575
76- Pre-commit check results are also attached to your PR through integration with Github Action .
76+ Pre-commit check results are also attached to your PR through integration with GitHub Actions .
7777
7878Performance benchmark
7979^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change 44
55import pytest
66from jsonschema .exceptions import SchemaError
7+ from jsonschema .exceptions import ValidationError
78from referencing import Registry
89from referencing import Resource
910
@@ -141,7 +142,9 @@ def test_validate_skip_schema_check():
141142 validate ("foo" , schema )
142143
143144 if has_ecma_regex ():
144- with pytest .raises (Exception ):
145+ with pytest .raises (
146+ ValidationError , match = "is not a valid regular expression"
147+ ):
145148 validate ("foo" , schema , check_schema = False )
146149 else :
147150 with pytest .raises (re .error ):
You can’t perform that action at this time.
0 commit comments