Skip to content

Commit 558d13d

Browse files
committed
test: fix python tests
Signed-off-by: Dmitry Dygalo <[email protected]>
1 parent c7ca411 commit 558d13d

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

bindings/python/tests-py/test_suite.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,16 @@ def maybe_optional(draft, schema, instance, expected, description, filename):
7272

7373
def pytest_generate_tests(metafunc):
7474
cases = [
75-
maybe_optional(draft, block["schema"], test["data"], test["valid"], test["description"], filename)
75+
maybe_optional(
76+
draft,
77+
block["schema"],
78+
test["data"],
79+
test["valid"],
80+
test["description"],
81+
filename,
82+
)
7683
for draft in SUPPORTED_DRAFTS
77-
for root, dirs, files in os.walk(f"{TEST_SUITE_PATH}/tests/draft{draft}/")
84+
for root, _, files in os.walk(f"{TEST_SUITE_PATH}/tests/draft{draft}/")
7885
for filename in files
7986
for block in load_file(os.path.join(root, filename))
8087
for test in block["tests"]
@@ -85,7 +92,7 @@ def pytest_generate_tests(metafunc):
8592
def test_draft(filename, draft, schema, instance, expected, description):
8693
error_message = f"[{filename}] {description}: {schema} | {instance}"
8794
try:
88-
result = jsonschema_rs.is_valid(schema, instance, int(draft))
95+
result = jsonschema_rs.is_valid(schema, instance, int(draft), with_meta_schemas=True)
8996
assert result is expected, error_message
9097
except ValueError:
9198
pytest.fail(error_message)

0 commit comments

Comments
 (0)