(lock_type: type[BaseFileLock], tmp_path: Path)
| 234 | |
| 235 | @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) |
| 236 | def test_nested_contruct(lock_type: type[BaseFileLock], tmp_path: Path) -> None: |
| 237 | lock_path = tmp_path / "a" |
| 238 | |
| 239 | with lock_type(str(lock_path), is_singleton=True, timeout=2) as lock_1: |
| 240 | assert lock_1.is_locked |
| 241 | |
| 242 | with lock_type(str(lock_path), is_singleton=True, timeout=2) as lock_2: |
| 243 | assert lock_2 is lock_1 |
| 244 | assert lock_2.is_locked |
| 245 | |
| 246 | assert lock_1.is_locked |
| 247 | |
| 248 | assert not lock_1.is_locked |
| 249 | |
| 250 | |
| 251 | @pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock]) |
nothing calls this directly
no test coverage detected