File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ cdef extern from "pdal/PointView.hpp" namespace "pdal":
8989cdef extern from " pdal/PipelineManager.hpp" namespace " pdal" :
9090 cdef cppclass PipelineManager:
9191 const PointViewSet& views() const
92+ bool pipelineStreamable() const
9293
9394
9495cdef extern from " pdal/PipelineExecutor.hpp" namespace " pdal" :
@@ -207,6 +208,9 @@ cdef class Pipeline(PipelineResultsMixin):
207208 self ._get_json(), chunk_size, prefetch
208209 )
209210 self ._configure_executor(executor)
211+ if not executor.getManagerConst().pipelineStreamable():
212+ raise RuntimeError (" Pipeline is not streamable" )
213+
210214 it = PipelineIterator()
211215 it.set_executor(executor)
212216 return it
Original file line number Diff line number Diff line change @@ -408,6 +408,12 @@ def test_meshio(self, filename):
408408
409409
410410class TestPipelineIterator :
411+ @pytest .mark .parametrize ("filename" , ["sort.json" , "sort.py" ])
412+ def test_non_streamable (self , filename ):
413+ r = get_pipeline (filename )
414+ with pytest .raises (RuntimeError ) as info :
415+ r .iterator ()
416+ assert str (info .value ) == "Pipeline is not streamable"
411417
412418 @pytest .mark .parametrize ("filename" , ["range.json" , "range.py" ])
413419 def test_array (self , filename ):
You can’t perform that action at this time.
0 commit comments