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 fffa6ce

Browse filesBrowse files
committed
Test that the preferred renamed_file property does not warn
1 parent a8f109c commit fffa6ce
Copy full SHA for fffa6ce

File tree

1 file changed

+10
-0
lines changed
Filter options

1 file changed

+10
-0
lines changed

‎test/deprecation/test_various.py

Copy file name to clipboardExpand all lines: test/deprecation/test_various.py
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"""Tests of assorted deprecation warnings with no extra subtleties to check."""
55

66
import gc
7+
import warnings
78

89
import pytest
910

@@ -25,5 +26,14 @@ def single_diff(tmp_path):
2526

2627

2728
def test_diff_renamed_warns(single_diff):
29+
"""The deprecated Diff.renamed property issues a deprecation warning."""
2830
with pytest.deprecated_call():
2931
single_diff.renamed
32+
33+
34+
def test_diff_renamed_file_does_not_warn(single_diff):
35+
"""The preferred Diff.renamed_file property issues no deprecation warning."""
36+
with warnings.catch_warnings():
37+
# FIXME: Refine this to filter for deprecation warnings from GitPython.
38+
warnings.simplefilter("error", DeprecationWarning)
39+
single_diff.renamed_file

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.