MCPcopy
hub / github.com/huggingface/datasets / test_long_path

Function test_long_path

tests/test_filelock.py:6–11  ·  view source on GitHub ↗
(tmpdir)

Source from the content-addressed store, hash-verified

4
5
6def test_long_path(tmpdir):
7 filename = "a" * 1000 + ".lock"
8 lock1 = FileLock(str(tmpdir / filename))
9 assert lock1.lock_file.endswith(".lock")
10 assert not lock1.lock_file.endswith(filename)
11 assert len(os.path.basename(lock1.lock_file)) <= 255

Callers

nothing calls this directly

Calls 1

FileLockClass · 0.90

Tested by

no test coverage detected