feat: new interface
This commit is contained in:
@@ -63,6 +63,7 @@ end
|
|||||||
---@param args NeotestRunArgs
|
---@param args NeotestRunArgs
|
||||||
---@return NeotestRunSpec
|
---@return NeotestRunSpec
|
||||||
function PythonNeotestAdapter.build_spec(args)
|
function PythonNeotestAdapter.build_spec(args)
|
||||||
|
local position = args.tree:data()
|
||||||
local results_path = vim.fn.tempname()
|
local results_path = vim.fn.tempname()
|
||||||
local runner = get_runner()
|
local runner = get_runner()
|
||||||
local python = base.get_python_command(vim.fn.getcwd())
|
local python = base.get_python_command(vim.fn.getcwd())
|
||||||
@@ -72,11 +73,10 @@ function PythonNeotestAdapter.build_spec(args)
|
|||||||
"--runner",
|
"--runner",
|
||||||
runner,
|
runner,
|
||||||
"--",
|
"--",
|
||||||
get_args(runner, args.position),
|
get_args(runner, position),
|
||||||
})
|
})
|
||||||
if args.position then
|
if position then
|
||||||
local pos = args.position
|
table.insert(script_args, position.id)
|
||||||
table.insert(script_args, pos.id)
|
|
||||||
end
|
end
|
||||||
local command = vim.tbl_flatten({
|
local command = vim.tbl_flatten({
|
||||||
python,
|
python,
|
||||||
|
Reference in New Issue
Block a user