Skip to content

Commit a587959

Browse files
committed
formatting
1 parent 8bb9272 commit a587959

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

google_symptoms/tests/test_date_utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ def generate_expected_start_end_dates(self, params_, issue_date):
8686

8787
dates = dates_dict[issue_date]
8888

89+
# Raw signals add 6 extra dates of padding for later calculating
90+
# smoothed signals. Since this test is checking an early step in the
91+
# process, before padding has happened, we can drop the first 6
92+
# dates.
8993
return {
9094
"export_start_date": min(dates[6:21]),
9195
"export_end_date": max(dates[6:21])

google_symptoms/tests/test_patch.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def generate_expected_dates(self, params_, smoother, issue_date):
4646
if smoother == "raw":
4747
return dates
4848
else:
49+
# Smoothed signals drop the first 6 dates.
4950
return dates[6:21]
5051

5152
def mocked_patch(self, params_):
@@ -79,11 +80,15 @@ def side_effect(*args, **kwargs):
7980

8081
assert smoothed_dates == expected_smoothed_dates
8182
assert raw_dates == expected_raw_dates
83+
8284
shutil.rmtree(issue_dir)
85+
8386
start_date += timedelta(days=1)
87+
8488
def test_patch_default(self, params_w_patch):
8589
params_w_patch["indicator"]["num_export_days"] = None
8690
self.mocked_patch(params_w_patch)
91+
8792
def test_patch_date_set(self, params_w_patch):
8893
self.mocked_patch(params_w_patch)
8994

0 commit comments

Comments
 (0)