(tmpdir)
| 1198 | |
| 1199 | |
| 1200 | def test_samefile(tmpdir): |
| 1201 | assert tmpdir.samefile(tmpdir) |
| 1202 | p = tmpdir.ensure(class="st">"hello") |
| 1203 | assert p.samefile(p) |
| 1204 | with p.dirpath().as_cwd(): |
| 1205 | assert p.samefile(p.basename) |
| 1206 | if sys.platform == class="st">"win32": |
| 1207 | p1 = p.__class__(str(p).lower()) |
| 1208 | p2 = p.__class__(str(p).upper()) |
| 1209 | assert p1.samefile(p2) |
| 1210 | |
| 1211 | |
| 1212 | @pytest.mark.skipif(not hasattr(os, class="st">"symlink"), reason=class="st">"os.symlink not available") |