Skip to content

Commit a7e2d55

Browse files
committed
test: improve uv_sync test resiliency against multiple OS's
1 parent 8b7d397 commit a7e2d55

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tests/test_venv_create.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,12 @@ T['create']['uv_sync'] = function()
4646
local python_version = vim.fn.system(
4747
[[python3 -c 'import sys; print(f"{sys.version_info[0]}.{sys.version_info[1]}", end="")']])
4848

49-
local dep_path = ("examples/python_projects/uv/.venv/lib/python%s/site-packages/requests"):format(python_version)
50-
eq(vim.fn.isdirectory(dep_path), 1)
49+
local dep_path = vim.fn.system([[examples/python_projects/uv/.venv/bin/python -c 'import sys; print(sys.path[-1], end="")']])
50+
assert(string.find(dep_path, "python_projects/uv/.venv", 1, true))
51+
52+
local check_dir = vim.fs.joinpath(dep_path, "requests")
53+
print("\nchecking: " .. check_dir .. "\n")
54+
eq(vim.fn.isdirectory(check_dir), 1)
5155
end
5256

5357
-- Return test set which will be collected and execute inside `MiniTest.run()`

0 commit comments

Comments
 (0)