Skip to content

Commit

Permalink
further tests
Browse files Browse the repository at this point in the history
Signed-off-by: nstarman <nstarman@users.noreply.github.com>
  • Loading branch information
nstarman committed Sep 21, 2023
1 parent 96516d8 commit 5f3b51f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions astropy/utils/tests/test_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,9 @@ def C(cls):
A.B.__deprecated__
== "The B method is deprecated and may be removed in a future version."
)
# And that it is not set on the original function which doesn't have
# the deprecation warning.
assert not hasattr(A.B.__wrapped__, "__deprecated__")

with pytest.warns(AstropyDeprecationWarning) as w:
A.C()
Expand All @@ -283,6 +286,9 @@ def C(cls):
A.C.__deprecated__
== "The C method is deprecated and may be removed in a future version."
)
# And that it is not set on the original function which doesn't have
# the deprecation warning.
assert not hasattr(A.C.__wrapped__, "__deprecated__")


def test_deprecated_argument():
Expand Down

0 comments on commit 5f3b51f

Please sign in to comment.