We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82f53c4 commit 1b2b95cCopy full SHA for 1b2b95c
tests/utilities/test_deprecation.py
@@ -1,6 +1,7 @@
1
import pytest
2
3
from pytorch_lightning.utilities.deprecation import deprecated
4
+from tests.helpers.utils import no_warning_call
5
6
7
def my_sum(a, b=3):
@@ -25,9 +26,8 @@ def test_deprecated_func():
25
26
assert dep_sum(2, b=5) == 7
27
28
# check that the warning is raised only once per function
- with pytest.warns(None) as record:
29
+ with no_warning_call(DeprecationWarning):
30
- assert len(record) == 0
31
32
# and does not affect other functions
33
with pytest.deprecated_call(
0 commit comments