Skip to content

Commit cc23265

Browse files
add from_arrays test
1 parent db2acb5 commit cc23265

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

tests/main/tgeompoint_test.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
TsTzSpanSet,
3131
STBox,
3232
)
33+
3334
from tests.conftest import TestPyMEOS
3435

3536

@@ -328,6 +329,18 @@ def test_copy_constructor(self, temporal):
328329
assert temporal == other
329330
assert temporal is not other
330331

332+
def test_from_arrays_constructor(self):
333+
tg = TGeomPointSeq.from_arrays(
334+
t = ["2019-09-01", "2019-09-02", "2019-09-03"],
335+
x = np.array([0.1, 0.2, 0.3]),
336+
y = np.array([1, 2, 3]),
337+
upper_inc=True,
338+
)
339+
assert tg == TGeomPointSeq(
340+
"{POINT(0.1 1)@2019-09-01 00:00:00+00, POINT(0.2 2)@2019-09-02 00:00:00+00, POINT(0.3 3)@2019-09-03 00:00:00+00}",
341+
upper_inc=True
342+
)
343+
331344

332345
class TestTGeomPointOutputs(TestTGeomPoint):
333346
tpi = TGeomPointInst("Point(1 1)@2019-09-01")

0 commit comments

Comments
 (0)