Skip to content

Commit 045e2d6

Browse files
author
Zhe Yu
committed
cov
1 parent d897463 commit 045e2d6

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tests/test_cli_utils.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from vectorcode.cli_utils import (
1212
CliAction,
1313
Config,
14+
LockManager,
1415
PromptCategory,
1516
QueryInclude,
1617
cleanup_path,
@@ -553,3 +554,11 @@ def test_shtab():
553554
.stderr.read()
554555
.decode()
555556
) == ""
557+
558+
559+
@pytest.mark.asyncio
560+
async def test_filelock():
561+
manager = LockManager()
562+
with tempfile.TemporaryDirectory() as tmp_dir:
563+
manager.get_lock(tmp_dir)
564+
assert os.path.isfile(os.path.join(tmp_dir, "vectorcode.lock"))

0 commit comments

Comments
 (0)