Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,18 @@ def test_process_images_output(runner, temp_dir):
jsonl_file = os.path.join(temp_dir, "dataset.jsonl")
assert os.path.exists(jsonl_file), f"Expected JSONL file not found: {jsonl_file}"

# Validate JSONL contents
entries = []
with open(jsonl_file, "r") as f:
for line in f:
if line.strip():
entries.append(json.loads(line))

assert len(entries) == num_images
for entry in entries:
for key in ["image", "text", "mask_path"]:
assert key in entry

# Print the final contents of the output directory
print("\nFinal contents of output directory:")
for file in os.listdir(temp_dir):
Expand Down