def test_invalid_path(self): cm.del_catalog() del_files_in_dir(sndbx_path) A = read_csv_metadata(path_a) p = os.sep.join([sndbx_path, 'A.pkl']) save_table(A, p) A1 = load_table(None)
def test_valid_path_table_3(self): cm.del_catalog() del_files_in_dir(sndbx_path) A = read_csv_metadata(path_a) p = os.sep.join([sndbx_path, 'A.pkl']) save_table(A, p, metadata_ext='pkll') A1 = load_table(p, metadata_ext='pklll') self.assertEqual(A.equals(A), True)
def test_valid_path_table_1(self): cm.del_catalog() del_files_in_dir(sndbx_path) A = read_csv_metadata(path_a) p = os.sep.join([sndbx_path, 'A.pkl']) save_table(A, p) A1 = load_table(p) self.assertEqual(A.equals(A), True) self.assertEqual(cm.get_key(A), cm.get_key(A1))
def test_valid_path_table_2(self): cm.del_catalog() del_files_in_dir(sndbx_path) A = read_csv_metadata(path_a) B = read_csv_metadata(path_b, key='ID') C = read_csv_metadata(path_c, ltable=A, rtable=B) p = os.sep.join([sndbx_path, 'C.pkl']) save_table(C, p) C1 = load_table(p) self.assertEqual(C.equals(C1), True) self.assertEqual(cm.get_key(C), cm.get_key(C1)) # self.assertEqual(cm.get_ltable(C).equals(cm.get_ltable(C1)), True) # self.assertEqual(cm.get_rtable(C).equals(cm.get_rtable(C1)), True) self.assertEqual(cm.get_fk_ltable(C), cm.get_fk_ltable(C1)) self.assertEqual(cm.get_fk_rtable(C), cm.get_fk_rtable(C1))