Skip to content

Commit b9cf15d

Browse files
committed
fix: skip, not fail, when frames_metadata.json is missing when there's no frames
1 parent 01b7040 commit b9cf15d

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

  • ingestion_tools/scripts/data_validation/standardized/fixtures

ingestion_tools/scripts/data_validation/standardized/fixtures/path.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,11 @@ def frames_meta_file(frames_dir: str, filesystem: FileSystemApi) -> str:
9898
dst = f"{frames_dir}/frames_metadata.json"
9999
if filesystem.exists(dst):
100100
return dst
101-
else:
102-
pytest.fail(f"The frames directory exists, but frames_metadata.json is not found: {dst}")
101+
# CollectionMetadataImporter writes the mdoc into Frames/ even when no frames are configured (e.g. synthetic datasets).
102+
files = filesystem.glob(f"{frames_dir}/*")
103+
if files and all(".mdoc" in f for f in files):
104+
pytest.skip(f"Frames directory contains only mdoc files, no frames_metadata.json expected: {frames_dir}")
105+
pytest.fail(f"The frames directory exists, but frames_metadata.json is not found: {dst}")
103106

104107

105108
@pytest.fixture(scope="session")

0 commit comments

Comments
 (0)