Skip to content
This repository has been archived by the owner on Aug 18, 2022. It is now read-only.

Commit

Permalink
Add test to check previous fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tmontaigu committed Dec 9, 2020
1 parent 54d412e commit 20c4c66
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pylastests/test_extrabytes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import pylas
from pylas.compression import find_laszip_executable
from pylastests.test_common import (
las_path_fixture,
test1_4_las,
extra_bytes_las,
write_then_read_again,
Expand Down Expand Up @@ -105,3 +106,13 @@ def test_conversion_keeps_eb(extrab_las):
)
for name in eb_0.points.extra_dimensions_names:
assert np.allclose(eb_0[name], extrab_las[name])


def test_adding_extra_bytes_keeps_values_of_all_existing_fields(las_path_fixture):
las = pylas.read(las_path_fixture)
las.add_extra_dims([])

original = pylas.read(las_path_fixture)

for name in las.point_format.dimension_names:
assert np.allclose(las[name], original[name])

0 comments on commit 20c4c66

Please sign in to comment.