File tree 1 file changed +25
-0
lines changed
1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 10
10
import pytest
11
11
12
12
from git .diff import NULL_TREE
13
+ from git .objects .util import Traversable
13
14
from git .repo import Repo
14
15
15
16
@@ -68,3 +69,27 @@ def test_commit_trailers_dict_does_not_warn(commit):
68
69
"""The nondeprecated Commit.trailers_dict property issues no deprecation warning."""
69
70
with _assert_no_deprecation_warning ():
70
71
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