Skip to content

Commit dd554b1

Browse files
birnbaumwillmcgugan
authored andcommitted
minor improvements and cleanup at fs.test.test_listdir (#211)
1 parent 9e4d4b9 commit dd554b1

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

fs/test.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -543,14 +543,13 @@ def test_listdir(self):
543543
self.assertEqual(self.fs.listdir("."), [])
544544
self.assertEqual(self.fs.listdir("./"), [])
545545

546-
# Make a few files
546+
# Make a few objects
547547
self.fs.setbytes("foo", b"egg")
548548
self.fs.setbytes("bar", b"egg")
549-
self.fs.setbytes("baz", b"egg")
549+
self.fs.makedir("baz")
550550

551-
# Check paths are unicode
552-
for name in self.fs.listdir("/"):
553-
self.assertIsInstance(name, six.text_type)
551+
# This should not be listed
552+
self.fs.setbytes("baz/egg", b"egg")
554553

555554
# Check list works
556555
six.assertCountEqual(self, self.fs.listdir("/"), ["foo", "bar", "baz"])

0 commit comments

Comments
 (0)