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],
236236 f'{ signal } _se' : 'se' ,
237237 f'{ signal } _n' : 'sample_size' ,
238238 }, 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' ,
240241 na_rep = 'NA' ,
241242 index = False , )
242243
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ def test_process_window(self, tmp_path):
128128 'sample_size' : [2 , 2 ]
129129 })
130130 actual = pd .read_csv (
131- export_dir / '2020-02-14_county_completely_home_prop .csv' )
131+ export_dir / '20200214_county_completely_home_prop .csv' )
132132 pd .testing .assert_frame_equal (expected , actual )
133133
134134 def test_process (self , tmp_path ):
@@ -141,7 +141,7 @@ def test_process(self, tmp_path):
141141 'raw_data/small_raw_data_1.csv' ,
142142 # File 2 does not exist.
143143 'raw_data/small_raw_data_2.csv' ,
144- 'raw_data/small_raw_data_3.csv' , ],
144+ 'raw_data/small_raw_data_3.csv' ],
145145 SIGNALS ,
146146 ['median_home_dwell_time' ,
147147 'completely_home_prop_7d_avg' ],
@@ -199,7 +199,7 @@ def test_process(self, tmp_path):
199199 })
200200 }
201201 actual = {signal : pd .read_csv (
202- export_dir / f'2020-06-12_state_ { signal } .csv' )
202+ export_dir / f'20200612_state_ { signal } .csv' )
203203 for signal in expected }
204204 for signal in expected :
205205 pd .testing .assert_frame_equal (expected [signal ], actual [signal ])
You can’t perform that action at this time.
0 commit comments