Skip to content

Commit

Permalink
Add a test to exercise the verification pipeline on a cloud catalog.
Browse files Browse the repository at this point in the history
  • Loading branch information
delucchi-cmu committed Jan 7, 2025
1 parent e39a051 commit 2a7a336
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/hats_import/test_run_verification.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from pathlib import Path

import pandas as pd
import pytest

import hats_import.verification.run_verification as runner
from hats_import.verification.arguments import VerificationArguments


def test_runner(small_sky_dir_cloud, tmp_path):
"""Runner should execute all tests and write a report to file."""
result_cols = ["datetime", "passed", "test", "target"]

args = VerificationArguments(input_catalog_path=small_sky_dir_cloud, output_path=tmp_path)
verifier = runner.run(args, write_mode="w")
all_passed = verifier.results_df.passed.all()
assert all_passed, "good catalog failed"
written_results = pd.read_csv(args.output_path / args.output_filename)
assert written_results[result_cols].equals(verifier.results_df[result_cols]), "report failed"

0 comments on commit 2a7a336

Please sign in to comment.