From 1848f34fcbf8e49a91865da6f17e5bb3efc12394 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 22 Sep 2020 10:50:00 -0400 Subject: [PATCH] Add unit test for iterdir on file. --- test_zipp.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test_zipp.py b/test_zipp.py index 8a00001..5084151 100644 --- a/test_zipp.py +++ b/test_zipp.py @@ -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)