Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a test to exercise the verification pipeline on a cloud catalog. #54

Merged
merged 2 commits into from
Jan 22, 2025
Merged
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
15 changes: 15 additions & 0 deletions tests/hats_import/test_run_verification.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import hats_import.verification.run_verification as runner
import pandas as pd
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"
Loading