()
| 1853 | def test_fd_finalization(self): |
| 1854 | # Check that close()ing the fwalk() generator closes FDs |
| 1855 | def getfd(): |
| 1856 | fd = os.dup(1) |
| 1857 | os.close(fd) |
| 1858 | return fd |
| 1859 | for topdown in (False, True): |
| 1860 | old_fd = getfd() |
| 1861 | it = self.fwalk(os_helper.TESTFN, topdown=topdown) |