Skip to content

Commit 1b2b95c

Browse files
committed
call
1 parent 82f53c4 commit 1b2b95c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/utilities/test_deprecation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import pytest
22

33
from pytorch_lightning.utilities.deprecation import deprecated
4+
from tests.helpers.utils import no_warning_call
45

56

67
def my_sum(a, b=3):
@@ -25,9 +26,8 @@ def test_deprecated_func():
2526
assert dep_sum(2, b=5) == 7
2627

2728
# check that the warning is raised only once per function
28-
with pytest.warns(None) as record:
29+
with no_warning_call(DeprecationWarning):
2930
assert dep_sum(2, b=5) == 7
30-
assert len(record) == 0
3131

3232
# and does not affect other functions
3333
with pytest.deprecated_call(

0 commit comments

Comments
 (0)