Skip to content

Commit 7544b8a

Browse files
fix: use pytest.deprecated_call context manager
1 parent bda1477 commit 7544b8a

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,6 @@ filterwarnings = [
228228
'ignore:You are using cryptography on a 32-bit Python on a 64-bit Windows Operating System. Cryptography will be significantly faster if you switch to using a 64-bit Python.:UserWarning',
229229
# https://github.com/berkerpeksag/astor/issues/217
230230
'ignore:ast.Num is deprecated:DeprecationWarning:astor',
231-
'ignore::DeprecationWarning:trio._tests.test_testing_raisesgroup',
232-
'ignore::DeprecationWarning:trio._tests.test_util'
233231
]
234232
junit_family = "xunit2"
235233
markers = ["redistributors_should_skip: tests that should be skipped by downstream redistributors"]

src/trio/_tests/test_testing_raisesgroup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
import pytest
88

99
import trio
10-
from trio.testing import Matcher, RaisesGroup
10+
11+
with pytest.deprecated_call():
12+
from trio.testing import Matcher, RaisesGroup
1113
from trio.testing._raises_group import repr_callable
1214

1315
if sys.version_info < (3, 11):
@@ -1107,7 +1109,7 @@ def test__ExceptionInfo(monkeypatch: pytest.MonkeyPatch) -> None:
11071109
"ExceptionInfo",
11081110
trio.testing._raises_group._ExceptionInfo,
11091111
)
1110-
with trio.testing.RaisesGroup(ValueError) as excinfo:
1112+
with RaisesGroup(ValueError) as excinfo:
11111113
raise ExceptionGroup("", (ValueError("hello"),))
11121114
assert excinfo.type is ExceptionGroup
11131115
assert excinfo.value.exceptions[0].args == ("hello",)

src/trio/_tests/test_util.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
import pytest
1010

1111
import trio
12-
from trio.testing import Matcher, RaisesGroup
12+
13+
with pytest.deprecated_call():
14+
from trio.testing import Matcher, RaisesGroup
1315

1416
from .. import _core
1517
from .._core._tests.tutil import (

0 commit comments

Comments
 (0)