Skip to content

Commit 068d853

Browse files
committed
Test deprecated decorator ;)
1 parent 02b05f1 commit 068d853

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test_semver.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
cmd_compare,
1515
compare,
1616
createparser,
17+
deprecated,
1718
finalize_version,
1819
format_version,
1920
main,
@@ -871,3 +872,12 @@ def test_should_raise_deprecation_warnings(func, args, kwargs):
871872
if not record:
872873
pytest.fail("Expected a DeprecationWarning for {}".format(func.__name__))
873874
assert len(record), "Expected one DeprecationWarning record"
875+
876+
877+
def test_deprecated_deco_without_argument():
878+
@deprecated
879+
def mock_func():
880+
return True
881+
882+
with pytest.deprecated_call():
883+
assert mock_func()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy