Skip to content

Commit 65decf1

Browse files
jakirkhamjoshmoore
andauthored
Bring coverage back up to 100% (#392)
* Drop `else` case Since nothing is done in this case, we can just skip having it. So drop this case. * Assert `keepbits` is as expected * Ignore `...` lines in `NDArrayLike` `Protocol` * Correct keepbits assertion * Revert change in `bitround` * Include Martin's contribution in release notes * Ignore missing codec from registry case Co-authored-by: Josh Moore <[email protected]>
1 parent 91d05e4 commit 65decf1

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

docs/release.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ Maintenance
5858
* Update ReadTheDocs.
5959
By :user:`John Kirkham <jakirkham>`, :issue:`383`.
6060

61+
* Bring coverage back up to 100%.
62+
By :user:`John Kirkham <jakirkham>` and :user:`Martin Durant <martindurant>`,
63+
:issue:`392` and :issue:`393`.
64+
6165
* Collect coverage on all OSes & enable Codecov.
6266
By :user:`John Kirkham <jakirkham>`, :issue:`386`, :issue:`388`,
6367
:issue:`390`, :issue:`391`.

numcodecs/ndarray_like.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,22 +53,22 @@ class NDArrayLike(Protocol, metaclass=_CachedProtocolMeta):
5353
flags: FlagsObj
5454

5555
def __len__(self) -> int:
56-
...
56+
... # pragma: no cover
5757

5858
def __getitem__(self, key) -> Any:
59-
...
59+
... # pragma: no cover
6060

6161
def __setitem__(self, key, value):
62-
...
62+
... # pragma: no cover
6363

6464
def tobytes(self, order: Optional[str] = ...) -> bytes:
65-
...
65+
... # pragma: no cover
6666

6767
def reshape(self, *shape: int, order: str = ...) -> "NDArrayLike":
68-
...
68+
... # pragma: no cover
6969

7070
def view(self, dtype: DType = ...) -> "NDArrayLike":
71-
...
71+
... # pragma: no cover
7272

7373

7474
def is_ndarray_like(obj: object) -> bool:

numcodecs/tests/test_registry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ def test_all_classes_registered():
3737
# remove `None``
3838
missing.remove(None)
3939
if missing:
40-
raise Exception(f"these codecs are missing: {missing}")
40+
raise Exception(f"these codecs are missing: {missing}") # pragma: no cover

numcodecs/zfpy.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ def __init__(
4646
self.compression_kwargs = {"rate": rate}
4747
elif mode == _zfpy.mode_fixed_precision:
4848
self.compression_kwargs = {"precision": precision}
49-
else:
50-
pass
5149

5250
self.tolerance = tolerance
5351
self.rate = rate

0 commit comments

Comments
 (0)