(self, func)
| 247 | self.assertRaises(TypeError, self.pathmodule.samefile) |
| 248 | |
| 249 | def _test_samefile_on_link_func(self, func): |
| 250 | test_fn1 = os_helper.TESTFN |
| 251 | test_fn2 = os_helper.TESTFN + "2" |
| 252 | self.addCleanup(os_helper.unlink, test_fn1) |
| 253 | self.addCleanup(os_helper.unlink, test_fn2) |
| 254 | |
| 255 | create_file(test_fn1) |
| 256 | |
| 257 | func(test_fn1, test_fn2) |
| 258 | self.assertTrue(self.pathmodule.samefile(test_fn1, test_fn2)) |
| 259 | os.remove(test_fn2) |
| 260 | |
| 261 | create_file(test_fn2) |
| 262 | self.assertFalse(self.pathmodule.samefile(test_fn1, test_fn2)) |
| 263 | |
| 264 | @os_helper.skip_unless_symlink |
| 265 | def test_samefile_on_symlink(self): |
no test coverage detected