MCPcopy
hub / github.com/pytest-dev/pytest / test_samefile

Function test_samefile

testing/_py/test_local.py:1200–1209  ·  view source on GitHub ↗
(tmpdir)

Source from the content-addressed store, hash-verified

1198
1199
1200def test_samefile(tmpdir):
1201 assert tmpdir.samefile(tmpdir)
1202 p = tmpdir.ensure("hello")
1203 assert p.samefile(p)
1204 with p.dirpath().as_cwd():
1205 assert p.samefile(p.basename)
1206 if sys.platform == "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, "symlink"), reason="os.symlink not available")

Callers

nothing calls this directly

Calls 5

samefileMethod · 0.80
ensureMethod · 0.80
as_cwdMethod · 0.80
dirpathMethod · 0.80
__class__Method · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…