File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 1212from git .diff import NULL_TREE
1313from git .objects .util import Traversable
1414from git .repo import Repo
15+ from git .util import Iterable as _Iterable , IterableObj
1516
1617
1718@contextlib .contextmanager
@@ -93,3 +94,19 @@ def test_traverse_traverse_override_does_not_warn(commit):
9394 """Calling traverse on concrete subclasses is not deprecated, does not warn."""
9495 with _assert_no_deprecation_warning ():
9596 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