MCPcopy Create free account
hub / github.com/tox-dev/filelock / test_default_poll_interval

Function test_default_poll_interval

tests/test_filelock.py:510–519  ·  view source on GitHub ↗
(lock_type: type[BaseFileLock], tmp_path: Path)

Source from the content-addressed store, hash-verified

508
509@pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock])
510def test_default_poll_interval(lock_type: type[BaseFileLock], tmp_path: Path) -> None:
511 lock_path = tmp_path / "a"
512 lock = lock_type(str(lock_path))
513 assert lock.poll_interval == pytest.approx(0.05)
514
515 lock_2 = lock_type(str(lock_path), poll_interval=0.1)
516 assert lock_2.poll_interval == pytest.approx(0.1)
517
518 lock_2.poll_interval = 0.2
519 assert lock_2.poll_interval == pytest.approx(0.2)
520
521
522@pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…