File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 12
12
from git .diff import NULL_TREE
13
13
from git .objects .util import Traversable
14
14
from git .repo import Repo
15
+ from git .util import Iterable as _Iterable , IterableObj
15
16
16
17
17
18
@contextlib .contextmanager
@@ -93,3 +94,19 @@ def test_traverse_traverse_override_does_not_warn(commit):
93
94
"""Calling traverse on concrete subclasses is not deprecated, does not warn."""
94
95
with _assert_no_deprecation_warning ():
95
96
commit .traverse ()
97
+
98
+
99
+ def test_iterable_inheriting_warns ():
100
+ """Subclassing the deprecated git.util.Iterable issues a deprecation warning."""
101
+ with pytest .deprecated_call ():
102
+
103
+ class Derived (_Iterable ):
104
+ pass
105
+
106
+
107
+ def test_iterable_obj_inheriting_does_not_warn ():
108
+ """Subclassing git.util.IterableObj is not deprecated, does not warn."""
109
+ with _assert_no_deprecation_warning ():
110
+
111
+ class Derived (IterableObj ):
112
+ pass
You can’t perform that action at this time.
0 commit comments