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)
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()))
def test_label_csv2(self): self.assertEqual( data_as_list(), get_labelled_rows(raw_data_file(), spec_file(), cfg_file()))
def test_segment_specs(self): self.assertEqual(ref_cfg_list(), load_cfg(cfg_file()))
def test_label_csv2(self): self.assertEqual(data_as_list(), get_labelled_rows(raw_data_file(), spec_file(), cfg_file()))
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)