Issue #27038: Expose DirEntry as os.DirEntry.

Thanks to Jelle Zijlstra for the code portion of the patch.
This commit is contained in:
Brett Cannon 2016-06-24 14:14:44 -07:00
parent 620d9c7200
commit a32c4d0531
4 changed files with 31 additions and 24 deletions

View file

@ -2854,6 +2854,7 @@ class TestScandir(unittest.TestCase):
self.assertEqual(stat1, stat2)
def check_entry(self, entry, name, is_dir, is_file, is_symlink):
self.assertIsInstance(entry, os.DirEntry)
self.assertEqual(entry.name, name)
self.assertEqual(entry.path, os.path.join(self.path, name))
self.assertEqual(entry.inode(),