Skip to content

Commit

Permalink
Add unit test for iterdir on file.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Sep 22, 2020
1 parent b63880f commit 1848f34
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test_zipp.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ def test_iterdir_and_types(self):
(i,) = h.iterdir()
assert i.is_file()

def test_iterdir_on_file(self):
for alpharep in self.zipfile_alpharep():
root = zipp.Path(alpharep)
a, b, g = root.iterdir()
with self.assertRaises(ValueError):
a.iterdir()

def test_subdir_is_dir(self):
for alpharep in self.zipfile_alpharep():
root = zipp.Path(alpharep)
Expand Down

0 comments on commit 1848f34

Please sign in to comment.