Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2c52696

Browse filesBrowse 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
Copy full SHA for 2c52696

File tree

1 file changed

+18
-0
lines changed
Filter options

1 file changed

+18
-0
lines changed

‎test/deprecation/test_various.py

Copy file name to clipboardExpand all lines: test/deprecation/test_various.py
+18Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.