Skip to content

Commit

Permalink
Merge pull request #63 from AndrewAnnex/fixed_ekaclc_test
Browse files Browse the repository at this point in the history
test_ekaclc is finally fixed
  • Loading branch information
AndrewAnnex committed Sep 27, 2014
2 parents 848ede7 + 35cefbc commit 4e0504e
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions test/test_wrapper.py
Expand Up @@ -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():
Expand All @@ -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()
Expand All @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 4e0504e

Please sign in to comment.