Skip to content

Commit 6645dba

Browse files
committed
FIX: Test
1 parent 1a4c5cc commit 6645dba

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

nitime/tests/test_timeseries.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -923,13 +923,13 @@ def test_timearray_math_functions(f, tu):
923923
a = np.arange(2, 11)
924924
b = ts.TimeArray(a, time_unit=tu)
925925
if f == "ptp" and ts._NP_2:
926-
with pytest.raises(AttributeError, match='`ptp` was removed'):
927-
a.ptp() # ndarray.ptp removed in 2.0
928-
return
926+
want = np.ptp(a)
927+
else:
928+
want = getattr(a, f)()
929929
npt.assert_(getattr(b, f)().__class__ == ts.TimeArray)
930930
npt.assert_(getattr(b, f)().time_unit == b.time_unit)
931931
# comparison with unitless should convert to the TimeArray's units
932-
npt.assert_(getattr(b, f)() == getattr(a, f)())
932+
npt.assert_(getattr(b, f)() == want)
933933

934934

935935
def test_timearray_var_prod():

0 commit comments

Comments
 (0)