def test_check_table_order_invalid_df2(self):
     A = read_csv_metadata(path_a)
     B = read_csv_metadata(path_b, key='ID')
     l_attr_types = au.get_attr_types(A)
     r_attr_types = au.get_attr_types(B)
     attr_corres = au.get_attr_corres(A, B)
     status = afg._check_table_order(A, None, l_attr_types, r_attr_types, attr_corres)
 def test_check_table_order_valid(self):
     A = read_csv_metadata(path_a)
     B = read_csv_metadata(path_b, key='ID')
     l_attr_types = au.get_attr_types(A)
     r_attr_types = au.get_attr_types(B)
     attr_corres = au.get_attr_corres(A, B)
     status = afg._check_table_order(A, B, l_attr_types, r_attr_types, attr_corres)
     self.assertEqual(status, True)
Esempio n. 3
0
 def test_check_table_order_invalid_df2(self):
     A = read_csv_metadata(path_a)
     B = read_csv_metadata(path_b, key='ID')
     l_attr_types = au.get_attr_types(A)
     r_attr_types = au.get_attr_types(B)
     attr_corres = au.get_attr_corres(A, B)
     status = afg._check_table_order(A, None, l_attr_types, r_attr_types,
                                     attr_corres)
 def test_check_table_order_invalid_attrcorres_ltable(self):
     A = read_csv_metadata(path_a)
     B = read_csv_metadata(path_b, key='ID')
     l_attr_types = au.get_attr_types(A)
     r_attr_types = au.get_attr_types(B)
     attr_corres = au.get_attr_corres(A, B)
     attr_corres['ltable'] = pd.DataFrame()
     status = afg._check_table_order(A, B, l_attr_types, r_attr_types, attr_corres)
     self.assertEqual(status, False)
Esempio n. 5
0
 def test_check_table_order_valid(self):
     A = read_csv_metadata(path_a)
     B = read_csv_metadata(path_b, key='ID')
     l_attr_types = au.get_attr_types(A)
     r_attr_types = au.get_attr_types(B)
     attr_corres = au.get_attr_corres(A, B)
     status = afg._check_table_order(A, B, l_attr_types, r_attr_types,
                                     attr_corres)
     self.assertEqual(status, True)
Esempio n. 6
0
 def test_check_table_order_invalid_attrcorres_ltable(self):
     A = read_csv_metadata(path_a)
     B = read_csv_metadata(path_b, key='ID')
     l_attr_types = au.get_attr_types(A)
     r_attr_types = au.get_attr_types(B)
     attr_corres = au.get_attr_corres(A, B)
     attr_corres['ltable'] = pd.DataFrame()
     status = afg._check_table_order(A, B, l_attr_types, r_attr_types,
                                     attr_corres)
     self.assertEqual(status, False)