Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork938
Commit96fc354
committed
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 wasa subclass of OSError but now is just another name for it), thebehavior of just yielding no items may be unintuitive, since onmost other errors an exception is raised.However, examining the code reveals this behavior is clearlyintentional. Furthrmore, it may be reasonable for applications torely on it, and it may be convenient in some situations. Forbackward compatibility, it probably can't be changed significantly.This adds tests that show both an error that does raise anerror-representing exception -- a well-formed hash not present inthe repository raising ValueError with a suitable message -- and anerror that silently causes the iterator to yield zero items.1 parent53e7383 commit96fc354
1 file changed
+11
-0
lines changedLines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
688 | 688 |
| |
689 | 689 |
| |
690 | 690 |
| |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
691 | 702 |
| |
692 | 703 |
| |
693 | 704 |
| |
|
0 commit comments
Comments
(0)