Skip to content

Commit

Permalink
call
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Mar 16, 2021
1 parent 7deb8ae commit 2c09f05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/utilities/test_deprecation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest

from pytorch_lightning.utilities.deprecation import deprecated
from tests.helpers.utils import no_warning_call


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

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

# and does not affect other functions
with pytest.deprecated_call(
Expand Down

0 comments on commit 2c09f05

Please sign in to comment.