(self)
| 5231 | os.path.join(os.fsencode(self.path),bytes_filename)) |
| 5232 | |
| 5233 | def test_removed_dir(self): |
| 5234 | path = os.path.join(self.path, 'dir') |
| 5235 | |
| 5236 | os.mkdir(path) |
| 5237 | entry = self.get_entry('dir') |
| 5238 | os.rmdir(path) |
| 5239 | |
| 5240 | # On POSIX, is_dir() result depends if scandir() filled d_type or not |
| 5241 | if os.name == 'nt': |
| 5242 | self.assertTrue(entry.is_dir()) |
| 5243 | self.assertFalse(entry.is_file()) |
| 5244 | self.assertFalse(entry.is_symlink()) |
| 5245 | if os.name == 'nt': |
| 5246 | self.assertRaises(FileNotFoundError, entry.inode) |
| 5247 | # don't fail |
| 5248 | entry.stat() |
| 5249 | entry.stat(follow_symlinks=False) |
| 5250 | else: |
| 5251 | self.assertGreater(entry.inode(), 0) |
| 5252 | self.assertRaises(FileNotFoundError, entry.stat) |
| 5253 | self.assertRaises(FileNotFoundError, entry.stat, follow_symlinks=False) |
| 5254 | |
| 5255 | def test_removed_file(self): |
| 5256 | entry = self.create_file_entry() |
nothing calls this directly
no test coverage detected