-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test to exercise the verification pipeline on a cloud catalog.
- Loading branch information
1 parent
e39a051
commit 2a7a336
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |