(self)
| 4955 | os.path.join(os.fsencode(self.path),bytes_filename)) |
| 4956 | |
| 4957 | def test_removed_dir(self): |
| 4958 | path = os.path.join(self.path, 'dir') |
| 4959 | |
| 4960 | os.mkdir(path) |
| 4961 | entry = self.get_entry('dir') |
| 4962 | os.rmdir(path) |
| 4963 | |
| 4964 | # On POSIX, is_dir() result depends if scandir() filled d_type or not |
| 4965 | if os.name == 'nt': |
| 4966 | self.assertTrue(entry.is_dir()) |
| 4967 | self.assertFalse(entry.is_file()) |
| 4968 | self.assertFalse(entry.is_symlink()) |
| 4969 | if os.name == 'nt': |
| 4970 | self.assertRaises(FileNotFoundError, entry.inode) |
| 4971 | # don't fail |
| 4972 | entry.stat() |
| 4973 | entry.stat(follow_symlinks=False) |
| 4974 | else: |
| 4975 | self.assertGreater(entry.inode(), 0) |
| 4976 | self.assertRaises(FileNotFoundError, entry.stat) |
| 4977 | self.assertRaises(FileNotFoundError, entry.stat, follow_symlinks=False) |
| 4978 | |
| 4979 | def test_removed_file(self): |
| 4980 | entry = self.create_file_entry() |
nothing calls this directly
no test coverage detected