Esempio n. 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)
Esempio n. 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()))
Esempio n. 3
0
 def test_label_csv2(self):
     self.assertEqual(
         data_as_list(),
         get_labelled_rows(raw_data_file(), spec_file(), cfg_file()))
Esempio n. 4
0
 def test_label_csv2(self):
     self.assertEqual(data_as_list(), get_labelled_rows(raw_data_file(), spec_file(), cfg_file()))
Esempio n. 5
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()))
Esempio n. 6
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)