feat: root finder

This commit is contained in:
Rónán Carrigan
2022-01-17 09:49:15 +00:00
parent fc2506b841
commit 1323c5ff09

View File

@@ -34,6 +34,8 @@ end
---@type NeotestAdapter ---@type NeotestAdapter
local PythonNeotestAdapter = { name = "neotest-python" } local PythonNeotestAdapter = { name = "neotest-python" }
PythonNeotestAdapter.root = lib.files.match_root_pattern("pyproject.toml", "setup.cfg", "mypy.ini", "pytest.ini", "setup.py")
function PythonNeotestAdapter.is_test_file(file_path) function PythonNeotestAdapter.is_test_file(file_path)
return base.is_test_file(file_path) return base.is_test_file(file_path)
end end
@@ -125,4 +127,3 @@ setmetatable(PythonNeotestAdapter, {
}) })
return PythonNeotestAdapter return PythonNeotestAdapter