From 35cefbcbecee174e85638859fa7d71dd1b1b108c Mon Sep 17 00:00:00 2001 From: AndrewAnnex Date: Sat, 27 Sep 2014 15:57:02 -0400 Subject: [PATCH] test_ekaclc may be finally fixed, it look like the other parameters must be exactly nrows in length. --- test/test_wrapper.py | 46 ++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/test/test_wrapper.py b/test/test_wrapper.py index ba7b04bf..f6248ef5 100644 --- a/test/test_wrapper.py +++ b/test/test_wrapper.py @@ -1226,21 +1226,21 @@ def test_ekacei(): assert not spice.exists(ekpath) -# def test_ekaclc(): -# spice.kclear() -# ekpath = cwd + "/example_ekaclc.ek" -# if spice.exists(ekpath): -# os.remove(ekpath) -# handle = spice.ekopn(ekpath, ekpath, 0) -# segno, rcptrs = spice.ekifld(handle, "test_table_ekaclc", 1, 10, 200, ["c1"], 200, -# ["DATATYPE = CHARACTER*(*), NULLS_OK = TRUE"]) -# spice.ekaclc(handle, segno, "c1", 10, ["1.0", "2.0"], [1], [False, False], rcptrs, [1]*10) -# spice.ekffld(handle, segno, rcptrs) -# spice.ekcls(handle) -# spice.kclear() -# if spice.exists(ekpath): -# os.remove(ekpath) -# assert not spice.exists(ekpath) +def test_ekaclc(): + spice.kclear() + ekpath = cwd + "/example_ekaclc.ek" + if spice.exists(ekpath): + os.remove(ekpath) + handle = spice.ekopn(ekpath, ekpath, 0) + segno, rcptrs = spice.ekifld(handle, "test_table_ekaclc", 1, 2, 200, ["c1"], 200, + ["DATATYPE = CHARACTER*(*), INDEXED = TRUE"]) + spice.ekaclc(handle, segno, "c1", 10, ["1.0", "2.0"], [4, 4], [False, False], rcptrs, [0, 0]) + spice.ekffld(handle, segno, rcptrs) + spice.ekcls(handle) + spice.kclear() + if spice.exists(ekpath): + os.remove(ekpath) + assert not spice.exists(ekpath) def test_ekacld(): @@ -1249,9 +1249,9 @@ def test_ekacld(): if spice.exists(ekpath): os.remove(ekpath) handle = spice.ekopn(ekpath, ekpath, 0) - segno, rcptrs = spice.ekifld(handle, "test_table_ekacld", 1, 10, 200, ["c1"], 200, + segno, rcptrs = spice.ekifld(handle, "test_table_ekacld", 1, 2, 200, ["c1"], 200, ["DATATYPE = DOUBLE PRECISION, NULLS_OK = TRUE"]) - spice.ekacld(handle, segno, "c1", [1.0, 2.0], [1], [False, False], rcptrs, [1]) + spice.ekacld(handle, segno, "c1", [1.0, 2.0], [1, 1], [False, False], rcptrs, [0, 0]) spice.ekffld(handle, segno, rcptrs) spice.ekcls(handle) spice.kclear() @@ -1266,9 +1266,9 @@ def test_ekacli(): if spice.exists(ekpath): os.remove(ekpath) handle = spice.ekopn(ekpath, ekpath, 0) - segno, rcptrs = spice.ekifld(handle, "test_table_ekacli", 1, 10, 200, ["c1"], 200, + segno, rcptrs = spice.ekifld(handle, "test_table_ekacli", 1, 2, 200, ["c1"], 200, ["DATATYPE = INTEGER, NULLS_OK = TRUE"]) - spice.ekacli(handle, segno, "c1", [1, 2], [1], [False, False], rcptrs, [1]) + spice.ekacli(handle, segno, "c1", [1, 2], [1, 1], [False, False], rcptrs, [0, 0]) spice.ekffld(handle, segno, rcptrs) spice.ekcls(handle) spice.kclear() @@ -1415,9 +1415,9 @@ def test_ekfind(): if spice.exists(ekpath): os.remove(ekpath) handle = spice.ekopn(ekpath, ekpath, 0) - segno, rcptrs = spice.ekifld(handle, "test_table_ekfind", 1, 10, 200, ["cc1"], 200, + segno, rcptrs = spice.ekifld(handle, "test_table_ekfind", 1, 2, 200, ["cc1"], 200, ["DATATYPE = INTEGER, NULLS_OK = TRUE"]) - spice.ekacli(handle, segno, "cc1", [1, 2], [1], [False, False], rcptrs, [1]) + spice.ekacli(handle, segno, "cc1", [1, 2], [1, 1], [False, False], rcptrs, [0, 0]) spice.ekffld(handle, segno, rcptrs) spice.ekcls(handle) spice.kclear() @@ -1455,9 +1455,9 @@ def test_ekifld(): if spice.exists(ekpath): os.remove(ekpath) handle = spice.ekopn(ekpath, ekpath, 0) - segno, rcptrs = spice.ekifld(handle, "test_table_ekifld", 1, 10, 200, ["c1"], 200, + segno, rcptrs = spice.ekifld(handle, "test_table_ekifld", 1, 2, 200, ["c1"], 200, ["DATATYPE = INTEGER, NULLS_OK = TRUE"]) - spice.ekacli(handle, segno, "c1", [1, 2], [1], [False, False], rcptrs, [1]) + spice.ekacli(handle, segno, "c1", [1, 2], [1, 1], [False, False], rcptrs, [0, 0]) spice.ekffld(handle, segno, rcptrs) spice.ekcls(handle) spice.kclear()