Skip to content

Commit

Permalink
coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 committed Oct 6, 2023
1 parent 2a6f2d3 commit 67b1aa6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/nd2/nd2file.py
Original file line number Diff line number Diff line change
Expand Up @@ -1052,9 +1052,10 @@ def _coord_shape(self) -> tuple[int, ...]:
def _frame_count(self) -> int:
return int(np.prod(self._coord_shape))

def _get_frame(self, index: SupportsInt) -> np.ndarray:
def _get_frame(self, index: SupportsInt) -> np.ndarray: # pragma: no cover
warnings.warn(
'Use of "_get_frame" is deprecated, use "read_frame" instead.', stacklevel=2
'Use of "_get_frame" is deprecated, use the public "read_frame" instead.',
stacklevel=2,
)
return self.read_frame(index)

Expand Down
2 changes: 2 additions & 0 deletions tests/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ def test_metadata_extraction(new_nd2: Path) -> None:
for i in range(nd._rdr._seq_count()):
assert isinstance(nd.frame_metadata(i), structures.FrameMetadata)
assert isinstance(nd.experiment, list)
assert isinstance(nd.loop_indices, list)
assert all(isinstance(x, dict) for x in nd.loop_indices)
assert isinstance(nd.text_info, dict)
assert isinstance(nd.sizes, dict)
assert isinstance(nd.custom_data, dict)
Expand Down

0 comments on commit 67b1aa6

Please sign in to comment.