Skip to content

Commit

Permalink
Test that the preferred renamed_file property does not warn
Browse files Browse the repository at this point in the history
  • Loading branch information
EliahKagan committed Mar 28, 2024
1 parent a8f109c commit fffa6ce
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/deprecation/test_various.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"""Tests of assorted deprecation warnings with no extra subtleties to check."""

import gc
import warnings

import pytest

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


def test_diff_renamed_warns(single_diff):
"""The deprecated Diff.renamed property issues a deprecation warning."""
with pytest.deprecated_call():
single_diff.renamed


def test_diff_renamed_file_does_not_warn(single_diff):
"""The preferred Diff.renamed_file property issues no deprecation warning."""
with warnings.catch_warnings():
# FIXME: Refine this to filter for deprecation warnings from GitPython.
warnings.simplefilter("error", DeprecationWarning)
single_diff.renamed_file

0 comments on commit fffa6ce

Please sign in to comment.