From 892b60a0119883ef9d32d5c7b82a1878027dc8c0 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Wed, 17 Jul 2024 16:08:33 -0400 Subject: [PATCH] tests: Don't assume a version has skills and knowledge schemas v3 only needed an update to `knowledge.json`. The skills schema remains unchanged, so it seems unnecessary to add a new copy of the same thing. Fix the test to not assume both schemas are included in every version bump. Skills should continue to specify v2. Signed-off-by: Russell Bryant --- tests/test_versions.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_versions.py b/tests/test_versions.py index ed08865..c83ad7d 100644 --- a/tests/test_versions.py +++ b/tests/test_versions.py @@ -38,6 +38,8 @@ def test_import_schema_base(self): schema_version = schema_base.joinpath(f"v{i+1}") for schema_name in ("compositional_skills", "knowledge", "version"): path = schema_version.joinpath(f"{schema_name}.json") + if not path.exists(): + continue self._load_schema(path) def test_import_schema_versions(self): @@ -45,4 +47,6 @@ def test_import_schema_versions(self): schema_version = resources.files(f"instructlab.schema.v{i+1}") for schema_name in ("compositional_skills", "knowledge", "version"): path = schema_version.joinpath(f"{schema_name}.json") + if not path.exists(): + continue self._load_schema(path)