Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dshemetov committed Apr 7, 2021
1 parent b89f0d4 commit d997a0d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion covid_act_now/tests/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def test_output_files(self, clean_receiving_dir):
run_module(self.PARAMS)
csv_files = set(listdir("receiving"))
csv_files.discard(".gitignore")
today = pd.Timestamp.today().date().strftime("%Y%m%d")

expected_files = set()
for signal in SIGNALS:
Expand All @@ -30,7 +31,11 @@ def test_output_files(self, clean_receiving_dir):
# All output files exist
assert csv_files == expected_files

expected_columns = [
"geo_id", "val", "se", "sample_size",
"missing_val", "missing_se", "missing_sample_size"
]
# All output files have correct columns
for csv_file in csv_files:
df = pd.read_csv(join("receiving", csv_file))
assert (df.columns.values == ["geo_id", "val", "se", "sample_size"]).all()
assert (df.columns.values == expected_columns).all()

0 comments on commit d997a0d

Please sign in to comment.