コード例 #1
0
 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)
コード例 #2
0
 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)
コード例 #3
0
    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)
コード例 #4
0
    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)
コード例 #5
0
    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))
コード例 #6
0
    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))
コード例 #7
0
    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))
コード例 #8
0
    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))