(self)
| 2192 | |
| 2193 | @needs_windows |
| 2194 | def test_delete_inner_junction(self): |
| 2195 | import _winapi |
| 2196 | tmp = self.cls(self.base, 'delete') |
| 2197 | tmp.mkdir() |
| 2198 | dir1 = tmp / 'dir1' |
| 2199 | dir2 = dir1 / 'dir2' |
| 2200 | dir3 = tmp / 'dir3' |
| 2201 | for d in dir1, dir2, dir3: |
| 2202 | d.mkdir() |
| 2203 | file1 = tmp / 'file1' |
| 2204 | file1.write_text('foo') |
| 2205 | link1 = dir1 / 'link1' |
| 2206 | _winapi.CreateJunction(str(dir2), str(link1)) |
| 2207 | link2 = dir1 / 'link2' |
| 2208 | _winapi.CreateJunction(str(dir3), str(link2)) |
| 2209 | link3 = dir1 / 'link3' |
| 2210 | _winapi.CreateJunction(str(file1), str(link3)) |
| 2211 | # make sure junctions are removed but not followed |
| 2212 | dir1._delete() |
| 2213 | self.assertFalse(dir1.exists()) |
| 2214 | self.assertTrue(dir3.exists()) |
| 2215 | self.assertTrue(file1.exists()) |
| 2216 | |
| 2217 | @needs_windows |
| 2218 | def test_delete_outer_junction(self): |
nothing calls this directly
no test coverage detected