You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add tests for current Submodule.iter_items behavior
Where the behavior is intended.
In the case of an invalid hash (or IOError, which in Python 2 was
a subclass of OSError but now is just another name for it), the
behavior of just yielding no items may be unintuitive, since on
most other errors an exception is raised.
However, examining the code reveals this behavior is clearly
intentional. Furthrmore, it may be reasonable for applications to
rely on it, and it may be convenient in some situations. For
backward compatibility, it probably can't be changed significantly.
This adds tests that show both an error that does raise an
error-representing exception -- a well-formed hash not present in
the repository raising ValueError with a suitable message -- and an
error that silently causes the iterator to yield zero items.
0 commit comments