(lock_type: type[BaseFileLock], tmp_path: Path)
| 219 | |
| 220 | @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) |
| 221 | def test_nested_forced_release(lock_type: type[BaseFileLock], tmp_path: Path) -> None: |
| 222 | lock = lock_type(str(tmp_path / "a")) |
| 223 | |
| 224 | with lock: |
| 225 | assert lock.is_locked |
| 226 | |
| 227 | lock.acquire() |
| 228 | assert lock.is_locked |
| 229 | |
| 230 | lock.release(force=True) |
| 231 | assert not lock.is_locked |
| 232 | assert not lock.is_locked |
| 233 | |
| 234 | |
| 235 | @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) |