Skip to content

Commit c4d0703

Browse files
committed
adapt testing for PDAL 2.9+
1 parent 6791a88 commit c4d0703

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ USE-CASE : Take a LiDAR map, create a mesh from the ground points, split into ti
422422
Requirements
423423
================================================================================
424424

425-
* PDAL 2.6+
425+
* PDAL 2.7+
426426
* Python >=3.9
427427
* Pybind11 (eg :code:`pip install pybind11[global]`)
428428
* Numpy >= 1.22 (eg :code:`pip install numpy`)

test/test_pipeline.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,11 @@ def test_pipeline(self, filename):
165165
"""Can we fetch PDAL pipeline string"""
166166
r = get_pipeline(filename)
167167
r.execute()
168-
assert json.loads(r.pipeline) == {
169-
"pipeline": [
168+
# filename might be an object in PDAL 2.9+
169+
# https://github.com/PDAL/PDAL/issues/4751
170+
171+
returned = json.loads(r.pipeline)
172+
expected = { "pipeline": [
170173
{
171174
"filename": "test/data/1.2-with-color.las",
172175
"tag": "readers_las1",
@@ -180,6 +183,10 @@ def test_pipeline(self, filename):
180183
},
181184
]
182185
}
186+
try:
187+
assert returned['pipeline'][0]['filename'] == "test/data/1.2-with-color.las"
188+
except AttributeError:
189+
assert returned['pipeline'][0]['filename']['path'] == "test/data/1.2-with-color.las"
183190

184191
@pytest.mark.parametrize("filename", ["sort.json", "sort.py"])
185192
def test_no_execute(self, filename):

0 commit comments

Comments
 (0)