Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/tox-dev/filelock
/ functions
Functions
572 in github.com/tox-dev/filelock
⨍
Functions
572
◇
Types & classes
42
↳
Endpoints
7
Function
test_default_mode_respects_umask
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_default_mode.py:56
Function
test_default_mode_skips_fchmod
(tmp_path: Path, mocker: MagicMock)
tests/test_default_mode.py:74
Function
test_default_poll_interval
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_filelock.py:510
Function
test_default_stale_threshold_is_triple_heartbeat
(lock_file: str)
tests/soft_rw/test_soft_rw_sync.py:166
Function
test_default_timeout
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_filelock.py:399
Function
test_del
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_filelock.py:462
Function
test_del_after_loop_close_does_not_raise
(lock_type: type[BaseAsyncFileLock], tmp_path: Path)
tests/test_async_filelock.py:341
Function
test_del_keeps_provided_executor_open
(lock_file: str)
tests/test_async_read_write.py:253
Function
test_del_shuts_down_owned_executor
(lock_file: str)
tests/test_async_read_write.py:243
Function
test_different_paths_no_conflict
(tmp_path: Path, lock_type: type[FileLock])
tests/test_self_deadlock.py:49
Function
test_different_threads_no_false_positive
(tmp_path: Path, lock_type: type[FileLock])
tests/test_self_deadlock.py:79
Function
test_double_check_read_reentrance
(lock_file: str, mocker: MockerFixture)
tests/test_read_write_unit.py:432
Function
test_double_check_write_reentrance
(lock_file: str, mocker: MockerFixture)
tests/test_read_write_unit.py:453
Function
test_double_check_wrong_mode_raises
( lock_file: str, mocker: MockerFixture, acquire_mode: Literal["read", "write"], conflicting_m
tests/test_read_write_unit.py:483
Function
test_downgrade_from_write_to_read_raises
(lock_file: str)
tests/soft_rw/test_soft_rw_sync.py:242
Function
test_downgrade_prohibited
(lock_file: str)
tests/test_async_read_write.py:115
Function
test_downgrade_write_to_read_prohibited
(lock_file: str)
tests/test_read_write_unit.py:169
Function
test_expired_lock_becomes_acquirable
(lock_type: type[FileLock | SoftFileLock], tmp_path: Path)
tests/test_lock_expiry.py:130
Function
test_expired_lock_is_broken
(lock_type: type[FileLock | SoftFileLock], tmp_path: Path)
tests/test_lock_expiry.py:19
Function
test_expired_lock_race_rename_fails
(tmp_path: Path, mocker: MockerFixture)
tests/test_lock_expiry.py:48
Function
test_explicit_mode_calls_fchmod
(tmp_path: Path, mocker: MagicMock)
tests/test_default_mode.py:86
Function
test_explicit_mode_overrides_umask
(tmp_path: Path)
tests/test_default_mode.py:99
Function
test_explicit_mode_property_returns_value
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_default_mode.py:25
Function
test_failed_reentrant_double_check_keeps_a_concurrent_holders_lock
(lock_file: str)
tests/test_read_write_unit.py:659
Function
test_fallback_emits_warning
(tmp_path: Path, mocker: MockerFixture)
tests/test_unix_fallback.py:25
Function
test_fallback_reentrant_locking
(tmp_path: Path, mocker: MockerFixture)
tests/test_unix_fallback.py:87
Function
test_fallback_release_unlinks_file
(tmp_path: Path, mocker: MockerFixture)
tests/test_unix_fallback.py:59
Function
test_fallback_subsequent_acquire_skips_flock
(tmp_path: Path, mocker: MockerFixture)
tests/test_unix_fallback.py:72
Function
test_fallback_swaps_to_soft
(tmp_path: Path, mocker: MockerFixture)
tests/test_unix_fallback.py:36
Function
test_fallback_writes_pid_and_hostname
(tmp_path: Path, mocker: MockerFixture)
tests/test_unix_fallback.py:47
Function
test_fifo_lock_file_does_not_block
(lock_path: Path)
tests/test_soft_stale.py:170
Function
test_fifo_write_marker_does_not_block
(lock_file: str)
tests/soft_rw/test_soft_rw_sync.py:759
Function
test_file_lock_positional_argument
(tmp_path: Path)
tests/test_filelock.py:917
Function
test_filenotfound_on_fuse_nfs_retries
FileNotFoundError from FUSE/NFS os.open(O_CREAT) race is handled by retry.
tests/test_filelock.py:1195
Function
test_finite_timeout_gives_timeout_not_deadlock
(tmp_path: Path, lock_type: type[FileLock])
tests/test_self_deadlock.py:29
Function
test_finite_timeout_transaction_lock
(lock_file: str, mode: Literal["read", "write"])
tests/test_read_write_unit.py:421
Function
test_flock_not_implemented_unix
(tmp_path: Path, mocker: MockerFixture)
tests/test_filelock.py:663
Function
test_force_release_cleans_registry
(tmp_path: Path, lock_type: type[FileLock])
tests/test_self_deadlock.py:129
Function
test_get_lock_returns_singleton
(lock_file: str)
tests/soft_rw/test_soft_rw_sync.py:202
Function
test_get_process_creation_time_returns_int_on_windows
()
tests/test_soft_stale.py:210
Function
test_get_process_creation_time_returns_none_for_dead_pid
()
tests/test_soft_stale.py:218
Function
test_get_process_creation_time_returns_none_on_unix
()
tests/test_soft_stale.py:223
Function
test_has_explicit_mode_false_by_default
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_default_mode.py:31
Function
test_has_explicit_mode_true_when_set
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_default_mode.py:37
Function
test_heartbeat_self_stops_on_token_replacement
(lock_file: str)
tests/soft_rw/test_soft_rw_sync.py:600
Function
test_heartbeat_self_stops_when_marker_vanishes
(lock_file: str)
tests/soft_rw/test_soft_rw_sync.py:582
Function
test_heartbeat_stops_when_marker_evicted
(lock_file: str, monkeypatch: pytest.MonkeyPatch)
tests/soft_rw/test_soft_rw_sync.py:682
Function
test_heartbeat_survives_transient_touch_error
(lock_file: str, monkeypatch: pytest.MonkeyPatch)
tests/soft_rw/test_soft_rw_sync.py:662
Function
test_init_sets_attributes
(lock_file: str)
tests/test_read_write_unit.py:107
Function
test_is_lock_held_by_us
(lock_path: Path, content: str | None, expected: bool)
tests/test_soft_stale.py:260
Function
test_lifetime_default_none
(tmp_path: Path)
tests/test_lock_expiry.py:71
Function
test_lifetime_property_getter_setter
(tmp_path: Path)
tests/test_lock_expiry.py:60
Function
test_lifetime_setter_accepts_zero
(value: float, tmp_path: Path)
tests/test_lock_expiry.py:98
Function
test_lifetime_setter_rejects_bool
(bad_value: bool, tmp_path: Path)
tests/test_lock_expiry.py:91
Function
test_lifetime_setter_rejects_negative_number
(bad_value: float, tmp_path: Path)
tests/test_lock_expiry.py:77
Function
test_lifetime_setter_rejects_non_numeric
(bad_value: object, tmp_path: Path)
tests/test_lock_expiry.py:84
Function
test_lifetime_singleton_match
(tmp_path: Path)
tests/test_lock_expiry.py:113
Function
test_lifetime_singleton_mismatch
(tmp_path: Path)
tests/test_lock_expiry.py:104
Function
test_live_heartbeat_keeps_lock_alive_past_stale_threshold
(lock_file: str)
tests/soft_rw/test_soft_rw_sync.py:703
Function
test_lock_acquired_after_release_keeps_path
(tmp_path: Path)
tests/test_filelock.py:981
Function
test_lock_can_be_non_thread_local
( tmp_path: Path, lock_type: type[BaseFileLock], )
tests/test_filelock.py:728
Function
test_lock_context_manager
(lock_file: str, mode: Literal["read", "write"])
tests/test_read_write_unit.py:205
Function
test_lock_downgrade_prohibited
Test that a process cannot downgrade from a write lock to a read lock.
tests/test_read_write.py:298
Function
test_lock_file_missing_during_expiry_check
(lock_type: type[FileLock | SoftFileLock], tmp_path: Path)
tests/test_lock_expiry.py:121
Function
test_lock_file_removed_after_release
(tmp_path: Path, lock_type: type[BaseFileLock])
tests/test_filelock.py:949
Function
test_lock_mode
(tmp_path: Path)
tests/test_filelock.py:572
Function
test_lock_mode_soft
(tmp_path: Path)
tests/test_filelock.py:591
Function
test_lock_mtime_updated_on_acquire
(lock_type: type[FileLock | SoftFileLock], tmp_path: Path)
tests/test_lock_expiry.py:167
Function
test_lock_upgrade_prohibited
Test that a process cannot upgrade from a read lock to a write lock.
tests/test_read_write.py:283
Function
test_lock_uses_instance_defaults
(lock_file: str, mode: Literal["read", "write"])
tests/test_read_write_unit.py:222
Function
test_lock_writes_pid_and_hostname
(lock_path: Path)
tests/test_soft_stale.py:49
Function
test_mtime_zero_exit_branch
( lock_type: type[BaseFileLock], expected_exc: type[BaseException], tmp_path: Path )
tests/test_filelock.py:934
Function
test_multiple_readers_can_hold_simultaneously
(lock_file: str)
tests/soft_rw/test_soft_rw_sync.py:316
Function
test_nested_acquire
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_filelock.py:169
Function
test_nested_context_manager
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_filelock.py:146
Function
test_nested_contruct
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_filelock.py:209
Function
test_nested_forced_release
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_filelock.py:192
Function
test_nested_read_context_managers
(lock_file: str)
tests/test_read_write_unit.py:355
Function
test_nested_read_context_managers
(lock_file: str)
tests/test_async_read_write.py:273
Function
test_nested_write_context_managers
(lock_file: str)
tests/test_read_write_unit.py:368
Function
test_nested_write_context_managers
(lock_file: str)
tests/test_async_read_write.py:284
Function
test_non_blocking
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_filelock.py:330
Function
test_non_blocking
(lock_type: type[BaseAsyncFileLock], tmp_path: Path)
tests/test_async_filelock.py:80
Function
test_non_blocking_behavior
Test that non-blocking parameter works correctly. This test directly attempts to acquire a read lock in non-blocking mode when a write lock is al
tests/test_read_write.py:340
Function
test_non_blocking_gives_timeout_not_deadlock
(tmp_path: Path, lock_type: type[FileLock])
tests/test_self_deadlock.py:39
Function
test_non_blocking_read
(lock_file: str)
tests/test_async_read_write.py:124
Function
test_non_blocking_read_fails_when_write_held
(lock_file: str)
tests/test_read_write_unit.py:295
Function
test_non_blocking_transaction_lock_timeout
(lock_file: str, mode: Literal["read", "write"])
tests/test_read_write_unit.py:385
Function
test_non_blocking_with_timeout_no_value_error
(lock_file: str, mode: Literal["read", "write"])
tests/test_read_write_unit.py:403
Function
test_non_blocking_write
(lock_file: str)
tests/test_async_read_write.py:136
Function
test_non_blocking_write_fails_when_read_held
(lock_file: str)
tests/test_read_write_unit.py:315
Function
test_non_blocking_writer_contended_raises
(lock_file: str)
tests/soft_rw/test_soft_rw_sync.py:498
Function
test_non_executor
(lock_type: type[BaseAsyncFileLock], thread_local: bool, tmp_path: Path)
tests/test_async_filelock.py:154
Function
test_non_singleton_creates_new_instance
(lock_file: str)
tests/test_read_write_unit.py:101
Function
test_non_singleton_returns_distinct_instances
(lock_file: str)
tests/soft_rw/test_soft_rw_sync.py:183
Function
test_non_thread_local_setter_visibility
With thread_local=False, property setters are visible across threads.
tests/test_filelock.py:771
Function
test_open_mode_returns_0o666_when_unset
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_default_mode.py:43
Function
test_open_mode_returns_explicit_value
(lock_type: type[BaseFileLock], tmp_path: Path)
tests/test_default_mode.py:49
Function
test_operational_error_handling
( lock_file: str, mocker: MockerFixture, error_msg: str, expected_exception: type[Exception],
tests/test_read_write_unit.py:523
Function
test_out_of_range_pid_not_evicted_when_fresh
(lock_path: Path)
tests/test_soft_stale.py:145
← previous
next →
301–400 of 572, ranked by callers