| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 53e7383 commit 96fc354
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -688,6 +688,17 @@ def test_root_module(self, rwrepo): | |||
| 688 | 688 | # gitdb: has either 1 or 2 submodules depending on the version. | |
| 689 | 689 | assert len(nsm.children()) >= 1 and nsmc.module_exists() | |
| 690 | 690 | ||
| 691 | + def test_iter_items_from_nonexistent_hash(self): | ||
| 692 | + it = Submodule.iter_items(self.rorepo, "b4ecbfaa90c8be6ed6d9fb4e57cc824663ae15b4") | ||
| 693 | + with self.assertRaisesRegex(ValueError, r"\bcould not be resolved\b"): | ||
| 694 | + next(it) | ||
| 695 | + | ||
| 696 | + def test_iter_items_from_invalid_hash(self): | ||
| 697 | + """Check legacy behavaior on BadName (also applies to IOError, i.e. OSError).""" | ||
| 698 | + it = Submodule.iter_items(self.rorepo, "xyz") | ||
| 699 | + with self.assertRaises(StopIteration): | ||
| 700 | + next(it) | ||
| 701 | + | ||
| 691 | 702 | @with_rw_repo(k_no_subm_tag, bare=False) | |
| 692 | 703 | def test_first_submodule(self, rwrepo): | |
| 693 | 704 | assert len(list(rwrepo.iter_submodules())) == 0 | |
| Back | FazBrowse Home | New Git URL |
0 commit comments