Skip to content

Commit 2c52696

Browse files
committed
Test that the deprecated Commit.trailers property warns
And that the non-deprecated recommended alternative trailers_list and trailers_dict properties do not warn. The test that trailers warns does not yet pass yet, because it has not yet been made to warn.
1 parent ff4b58d commit 2c52696

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/deprecation/test_various.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,21 @@ def test_diff_renamed_file_does_not_warn(diff):
5050
"""The preferred Diff.renamed_file property issues no deprecation warning."""
5151
with _assert_no_deprecation_warning():
5252
diff.renamed_file
53+
54+
55+
def test_commit_trailers_warns(commit):
56+
"""The deprecated Commit.trailers property issues a deprecation warning."""
57+
with pytest.deprecated_call():
58+
commit.trailers
59+
60+
61+
def test_commit_trailers_list_does_not_warn(commit):
62+
"""The nondeprecated Commit.trailers_list property issues no deprecation warning."""
63+
with _assert_no_deprecation_warning():
64+
commit.trailers_list
65+
66+
67+
def test_commit_trailers_dict_does_not_warn(commit):
68+
"""The nondeprecated Commit.trailers_dict property issues no deprecation warning."""
69+
with _assert_no_deprecation_warning():
70+
commit.trailers_dict

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