Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions benchmarks/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from benchmarks.cases import BenchmarkCase
from benchmarks.cases import build_cases
from openapi_schema_validator.shortcuts import _clear_validate_cache
from openapi_schema_validator.shortcuts import clear_validate_cache
from openapi_schema_validator.shortcuts import validate


Expand Down Expand Up @@ -64,7 +64,7 @@ def _measure_helper_validate_per_second(
*,
check_schema: bool,
) -> float:
_clear_validate_cache()
clear_validate_cache()
for _ in range(warmup):
validate(
case.instance,
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ To run all checks on all files, enter:

pre-commit run --all-files

Pre-commit check results are also attached to your PR through integration with Github Action.
Pre-commit check results are also attached to your PR through integration with GitHub Actions.

Performance benchmark
^^^^^^^^^^^^^^^^^^^^^
Expand Down
5 changes: 4 additions & 1 deletion tests/unit/test_shortcut.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import pytest
from jsonschema.exceptions import SchemaError
from jsonschema.exceptions import ValidationError
from referencing import Registry
from referencing import Resource

Expand Down Expand Up @@ -141,7 +142,9 @@ def test_validate_skip_schema_check():
validate("foo", schema)

if has_ecma_regex():
with pytest.raises(Exception):
with pytest.raises(
ValidationError, match="is not a valid regular expression"
):
validate("foo", schema, check_schema=False)
else:
with pytest.raises(re.error):
Expand Down
Loading