Skip to content

Commit

Permalink
add 'nocover' for some if blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
espdev committed Jan 21, 2020
1 parent 536332a commit a6d296a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions csaps/_sspumv.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def __call__(self, xi: UnivariateDataType) -> np.ndarray:
"""
xi = ty.cast(np.ndarray, np.asarray(xi, dtype=np.float64))

if xi.ndim > 1:
if xi.ndim > 1: # pragma: no cover
raise ValueError('"xi" data must be a 1-d array.')

return self._spline.evaluate(xi)
Expand Down Expand Up @@ -239,7 +239,7 @@ def _make_spline(self, smooth: ty.Optional[float]) -> ty.Tuple[SplinePPForm, flo
pcount = self._xdata.size
dx = np.diff(self._xdata)

if not all(dx > 0):
if not all(dx > 0): # pragma: no cover
raise ValueError('Items of xdata vector must satisfy the condition: x1 < x2 < ... < xN')

dy = np.diff(self._ydata, axis=1)
Expand Down Expand Up @@ -429,7 +429,7 @@ def __init__(self,

tdata = ty.cast(np.ndarray, np.asarray(tdata, dtype=np.float64))

if tdata.size != ydata.shape[-1]:
if tdata.size != ydata.shape[-1]: # pragma: no cover
raise ValueError(f'"tdata" size must be equal to "ydata" shape[{axis}] size ({ydata.shape[axis]})')

self._tdata = tdata
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def _get_long_description():
],
'tests': [
'pytest',
'coverage',
],
},
package_data={"csaps": ["py.typed"]},
Expand Down

0 comments on commit a6d296a

Please sign in to comment.