Skip to content

Commit 34bc39f

Browse files
committed
MAINT: fixed test with recent pytest
1 parent 0db3eeb commit 34bc39f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

larray/tests/test_checked_session.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,11 @@ def test_add_cs(checkedsession):
267267
test_add(cs)
268268

269269
u = Axis('u=u0..u2')
270-
with must_warn(UserWarning, msg=("Session.add() is deprecated. Please use Session.update() instead.",
271-
f"'u' is not declared in '{cs.__class__.__name__}'")):
270+
messages = (
271+
"Session.add() is deprecated. Please use Session.update() instead.",
272+
f"'u' is not declared in '{cs.__class__.__name__}'"
273+
)
274+
with must_warn((FutureWarning, UserWarning), msg=messages):
272275
cs.add(u)
273276

274277

0 commit comments

Comments
 (0)