File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -236,7 +236,8 @@ def process_window(df_list: List[pd.DataFrame],
236
236
f'{ signal } _se' : 'se' ,
237
237
f'{ signal } _n' : 'sample_size' ,
238
238
}, axis = 1 )
239
- df_export .to_csv (f'{ export_dir } /{ date } _{ geo_res } _{ signal } .csv' ,
239
+ date_str = date .strftime ('%Y%m%d' )
240
+ df_export .to_csv (f'{ export_dir } /{ date_str } _{ geo_res } _{ signal } .csv' ,
240
241
na_rep = 'NA' ,
241
242
index = False , )
242
243
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ def test_process_window(self, tmp_path):
128
128
'sample_size' : [2 , 2 ]
129
129
})
130
130
actual = pd .read_csv (
131
- export_dir / '2020-02-14_county_completely_home_prop .csv' )
131
+ export_dir / '20200214_county_completely_home_prop .csv' )
132
132
pd .testing .assert_frame_equal (expected , actual )
133
133
134
134
def test_process (self , tmp_path ):
@@ -141,7 +141,7 @@ def test_process(self, tmp_path):
141
141
'raw_data/small_raw_data_1.csv' ,
142
142
# File 2 does not exist.
143
143
'raw_data/small_raw_data_2.csv' ,
144
- 'raw_data/small_raw_data_3.csv' , ],
144
+ 'raw_data/small_raw_data_3.csv' ],
145
145
SIGNALS ,
146
146
['median_home_dwell_time' ,
147
147
'completely_home_prop_7d_avg' ],
@@ -199,7 +199,7 @@ def test_process(self, tmp_path):
199
199
})
200
200
}
201
201
actual = {signal : pd .read_csv (
202
- export_dir / f'2020-06-12_state_ { signal } .csv' )
202
+ export_dir / f'20200612_state_ { signal } .csv' )
203
203
for signal in expected }
204
204
for signal in expected :
205
205
pd .testing .assert_frame_equal (expected [signal ], actual [signal ])
You can’t perform that action at this time.
0 commit comments