Skip to content

Commit

Permalink
FIX: Test
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Jun 12, 2024
1 parent 1a4c5cc commit 6645dba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nitime/tests/test_timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -923,13 +923,13 @@ def test_timearray_math_functions(f, tu):
a = np.arange(2, 11)
b = ts.TimeArray(a, time_unit=tu)
if f == "ptp" and ts._NP_2:
with pytest.raises(AttributeError, match='`ptp` was removed'):
a.ptp() # ndarray.ptp removed in 2.0
return
want = np.ptp(a)
else:
want = getattr(a, f)()
npt.assert_(getattr(b, f)().__class__ == ts.TimeArray)
npt.assert_(getattr(b, f)().time_unit == b.time_unit)
# comparison with unitless should convert to the TimeArray's units
npt.assert_(getattr(b, f)() == getattr(a, f)())
npt.assert_(getattr(b, f)() == want)


def test_timearray_var_prod():
Expand Down

0 comments on commit 6645dba

Please sign in to comment.