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

Diff for: test/deprecation/test_various.py

+18
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)