@@ -22,34 +22,34 @@ local T = new_set({
2222})
2323
2424
25- T [' create' ] = MiniTest .new_set ({
26- -- retries to account for uv speed downloading dependencies
27- n_retry = 3 ,
28- post_case = function ()
29- child .cmd (" !rm -rf .venv" )
30- end ,
31- pre_case = function ()
32- child .lua (" create = require('python.venv.create')" )
33- child .cmd (" cd examples/python_projects/uv" )
34- child .cmd (" !rm -rf .venv" )
35- child .cmd (" e main.py" )
36- child .lua (" create.create_venv_with_python('.venv', 'python3')" )
37- end
38- })
25+ T [' create' ] = MiniTest .new_set ({ n_retry = 3 })
3926
27+ -- NOTE: requires python3 and python3-venv installed on system
4028T [' create' ][' venv' ] = function ()
29+ child .lua (" create = require('python.venv.create')" )
30+ child .cmd (" cd examples/python_projects/uv" )
31+ child .cmd (" !rm -rf .venv" )
32+ child .cmd (" e main.py" )
33+ child .lua (" create.create_venv_with_python('.venv', 'python3')" )
4134 eq (child .cmd_capture (" !test -d .venv" ), " :!test -d .venv\r\n\n " )
35+ child .cmd (" !rm -rf .venv" )
4236end
4337
38+ -- NOTE: requires uv installed on system
4439T [' create' ][' uv_sync' ] = function ()
40+ child .lua (" create = require('python.venv.create')" )
41+ child .cmd (" cd examples/python_projects/uv" )
42+ child .cmd (" !rm -rf .venv" )
43+ child .cmd (" e main.py" )
44+ child .lua (" create.create_venv_with_python('.venv', 'python3')" )
4545 child .lua (" create.uv_sync('uv.lock', '.venv', function()end, false)" )
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/boto3 " ):format (python_version )
49+ local dep_path = (" examples/python_projects/uv/.venv/lib/python%s/site-packages/requests " ):format (python_version )
5050
5151 print (" \n " .. dep_path .. " \n " )
52- print (" \n " .. vim . fn . system ( " uv sync" ) .. " \n " )
52+ print (" \n " .. child . cmd_capture ( " ! uv sync" ) .. " \n " )
5353 eq (vim .fn .isdirectory (dep_path ), 1 )
5454end
5555
0 commit comments