Skip to content

Commit

Permalink
start test
Browse files Browse the repository at this point in the history
  • Loading branch information
scottstanie committed Jan 10, 2024
1 parent 4c4f8e7 commit 840b959
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/test_readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
BinaryStackReader,
HDF5Reader,
HDF5StackReader,
RasterReader,
RasterStackReader,
VRTStack,
_parse_vrt_file,
)
Expand Down Expand Up @@ -152,6 +154,28 @@ def test_hdf5_stack_read_slices(
npt.assert_array_almost_equal(s, expected)


# #### RasterReader Tests ####

# We already have raster files in slc_file_list


def test_raster_reader(slc_file_list, slc_stack):
r = RasterReader(slc_file_list[0])
assert r.shape == slc_stack[0].shape
assert r.dtype == slc_stack[0].dtype
assert r.ndim == 2
assert r.shape == (100, 200)
assert r.dtype == np.complex64


def test_raster_stack_reader(slc_file_list, slc_stack):
s = RasterStackReader.from_file_list(slc_file_list)
assert s.shape == slc_stack.shape
assert len(s) == len(slc_stack) == len(slc_file_list)
assert s.ndim == 3
assert s.dtype == slc_stack.dtype


# #### VRT Tests ####


Expand Down

0 comments on commit 840b959

Please sign in to comment.