Skip to content

Commit 6a15836

Browse files
authored
Enhance tests for pdal.Reader and pdal.Writer types
Added assertions to validate reader and writer types for filespec format.
1 parent 199b695 commit 6a15836

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/test_pipeline.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import os
44
import sys
55

6-
from typing import List
76
from itertools import product
87
import numpy as np
98
import pytest
@@ -284,6 +283,12 @@ def test_infer_stage_type(self):
284283
assert pdal.Writer("foo.xxx").type == ""
285284
assert pdal.Reader().type == ""
286285
assert pdal.Writer().type == ""
286+
assert pdal.Reader({"path": "foo.las"}).type == "readers.las"
287+
assert pdal.Writer({"path": "foo.las"}).type == "writers.las"
288+
assert pdal.Reader({"path": "foo.xxx"}).type == ""
289+
assert pdal.Writer({"path": "foo.xxx"}).type == ""
290+
assert pdal.Reader({}).type == ""
291+
assert pdal.Writer({}).type == ""
287292

288293
def test_streamable(self):
289294
"""Can we distinguish streamable from non-streamable stages and pipeline"""

0 commit comments

Comments
 (0)