Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitfffa6ce

Browse files
committed
Test that the preferred renamed_file property does not warn
1 parenta8f109c commitfffa6ce

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

‎test/deprecation/test_various.py

Lines 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
importgc
7+
importwarnings
78

89
importpytest
910

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

2627

2728
deftest_diff_renamed_warns(single_diff):
29+
"""The deprecated Diff.renamed property issues a deprecation warning."""
2830
withpytest.deprecated_call():
2931
single_diff.renamed
32+
33+
34+
deftest_diff_renamed_file_does_not_warn(single_diff):
35+
"""The preferred Diff.renamed_file property issues no deprecation warning."""
36+
withwarnings.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)

[8]ページ先頭

©2009-2025 Movatter.jp