From c0a5d07143e1e46c62a8818ee49c7a44f70646ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3n=C3=A1n=20Carrigan?= Date: Tue, 4 Jan 2022 09:29:32 +0000 Subject: [PATCH] feat: new interface --- lua/neotest-python/init.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/neotest-python/init.lua b/lua/neotest-python/init.lua index f78d601..146feeb 100644 --- a/lua/neotest-python/init.lua +++ b/lua/neotest-python/init.lua @@ -63,6 +63,7 @@ end ---@param args NeotestRunArgs ---@return NeotestRunSpec function PythonNeotestAdapter.build_spec(args) + local position = args.tree:data() local results_path = vim.fn.tempname() local runner = get_runner() local python = base.get_python_command(vim.fn.getcwd()) @@ -72,11 +73,10 @@ function PythonNeotestAdapter.build_spec(args) "--runner", runner, "--", - get_args(runner, args.position), + get_args(runner, position), }) - if args.position then - local pos = args.position - table.insert(script_args, pos.id) + if position then + table.insert(script_args, position.id) end local command = vim.tbl_flatten({ python,