forked from Skull-boy/agent-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_schemas_sync.py
More file actions
29 lines (18 loc) · 900 Bytes
/
Copy pathtest_schemas_sync.py
File metadata and controls
29 lines (18 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from pathlib import Path
from scyvera.validator import SCHEMA_V1_PATH, SCHEMA_V1_1_PATH
ROOT = Path(__file__).resolve().parent.parent
def test_schema_v1_sync():
root_v1 = ROOT / "schemas" / "v1" / "contract.schema.json"
pkg_v1 = ROOT / "src" / "scyvera" / "schemas" / "v1" / "contract.schema.json"
assert root_v1.exists()
assert pkg_v1.exists()
assert root_v1.read_text(encoding="utf-8") == pkg_v1.read_text(encoding="utf-8")
def test_schema_v1_1_sync():
root_v1_1 = ROOT / "schemas" / "v1.1" / "contract.schema.json"
pkg_v1_1 = ROOT / "src" / "scyvera" / "schemas" / "v1.1" / "contract.schema.json"
assert root_v1_1.exists()
assert pkg_v1_1.exists()
assert root_v1_1.read_text(encoding="utf-8") == pkg_v1_1.read_text(encoding="utf-8")
def test_package_schema_paths_resolve():
assert SCHEMA_V1_PATH.exists()
assert SCHEMA_V1_1_PATH.exists()