File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1010import pytest
1111
1212from git .diff import NULL_TREE
13+ from git .objects .util import Traversable
1314from git .repo import Repo
1415
1516
@@ -68,3 +69,27 @@ def test_commit_trailers_dict_does_not_warn(commit):
6869 """The nondeprecated Commit.trailers_dict property issues no deprecation warning."""
6970 with _assert_no_deprecation_warning ():
7071 commit .trailers_dict
72+
73+
74+ def test_traverse_list_traverse_in_base_class_warns (commit ):
75+ """Traversable.list_traverse's base implementation issues a deprecation warning."""
76+ with pytest .deprecated_call ():
77+ Traversable .list_traverse (commit )
78+
79+
80+ def test_traversable_list_traverse_override_does_not_warn (commit ):
81+ """Calling list_traverse on concrete subclasses is not deprecated, does not warn."""
82+ with _assert_no_deprecation_warning ():
83+ commit .list_traverse ()
84+
85+
86+ def test_traverse_traverse_in_base_class_warns (commit ):
87+ """Traversable.traverse's base implementation issues a deprecation warning."""
88+ with pytest .deprecated_call ():
89+ Traversable .traverse (commit )
90+
91+
92+ def test_traverse_traverse_override_does_not_warn (commit ):
93+ """Calling traverse on concrete subclasses is not deprecated, does not warn."""
94+ with _assert_no_deprecation_warning ():
95+ commit .traverse ()
You can’t perform that action at this time.
0 commit comments