예제 #1
0
 def test_database(self):
     gen = list(
         stream_flat_data(
             get_labelled_rows(raw_data_file(), spec_file(), cfg_file())))
     stream_to_database(gen)
     dfa, dfq, dfm = get_reshaped_dfs()
     self.assertEqual(dfa.loc[2014, 'I_yoy'], 97.3)
예제 #2
0
 def test_import(self):
     self.assertTrue(os.path.exists(raw_data_file()))
     self.assertTrue(os.path.exists(spec_file()))
     self.assertTrue(os.path.exists(cfg_file()))
예제 #3
0
 def test_label_csv2(self):
     self.assertEqual(
         data_as_list(),
         get_labelled_rows(raw_data_file(), spec_file(), cfg_file()))
예제 #4
0
 def test_segment_specs(self):
     self.assertEqual(ref_cfg_list(), load_cfg(cfg_file()))
예제 #5
0
 def test_label_csv2(self):
     self.assertEqual(data_as_list(), get_labelled_rows(raw_data_file(), spec_file(), cfg_file()))
예제 #6
0
 def test_segment_specs(self):
     self.assertEqual(ref_cfg_list(), load_cfg(cfg_file()))
예제 #7
0
 def test_import(self):
     self.assertTrue(os.path.exists(raw_data_file()))
     self.assertTrue(os.path.exists(spec_file()))
     self.assertTrue(os.path.exists(cfg_file()))
예제 #8
0
 def test_database(self):
     gen = list(stream_flat_data(get_labelled_rows(raw_data_file(), spec_file(), cfg_file())))
     stream_to_database(gen)
     dfa, dfq, dfm = get_reshaped_dfs()
     self.assertEqual(dfa.loc[2014, 'I_yoy'], 97.3)