diff --git a/tests/common.py b/tests/common.py index ea749495..02516301 100644 --- a/tests/common.py +++ b/tests/common.py @@ -11,7 +11,8 @@ SCHEMAS_PATH = RESOURCES_PATH / "schemas" / "stsci.edu" / "asdf" DOCS_PATH = ROOT_PATH / "docs" / "source" -DOCS_SCHEMAS_PATH = DOCS_PATH / "schemas" +DOCS_SCHEMAS_PATH = DOCS_PATH +DOCS_SCHEMAS_LIST = ['astronomy.rst', 'core.rst', 'legacy.rst', 'yaml_schema.rst'] YAML_SCHEMA_PATH = RESOURCES_PATH / "schemas" / "stsci.edu" / "yaml-schema" MANIFESTS_PATH = RESOURCES_PATH / "manifests" / "asdf-format.org" / "core" diff --git a/tests/conftest.py b/tests/conftest.py index 97bd40c0..950568a1 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,6 +1,8 @@ import pytest +import glob from common import ( DOCS_SCHEMAS_PATH, + DOCS_SCHEMAS_LIST, MANIFEST_ID_PREFIX, MANIFESTS_PATH, METASCHEMA_ID, @@ -93,7 +95,8 @@ def add_schemas(path, prefix, result): @pytest.fixture(scope="session") def docs_schema_ids(): result = [] - for path in DOCS_SCHEMAS_PATH.glob("**/*.rst"): + for fname in DOCS_SCHEMAS_LIST: + path = glob.glob(f"{DOCS_SCHEMAS_PATH}/{fname}")[0] if path != DOCS_SCHEMAS_PATH / "manifest.rst": add_schemas(path, SCHEMA_ID_PREFIX, result) return result