From a0c5c567fb09a60f77a30d8cc481ef5a3b1a5666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3n=C3=A1n=20Carrigan?= Date: Wed, 28 Sep 2022 09:02:29 +0100 Subject: [PATCH] fix: use correct separator See https://github.com/nvim-neotest/neotest/issues/118 --- lua/neotest-python/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/neotest-python/init.lua b/lua/neotest-python/init.lua index a509654..7a37023 100644 --- a/lua/neotest-python/init.lua +++ b/lua/neotest-python/init.lua @@ -5,7 +5,7 @@ local base = require("neotest-python.base") local function script_path() local str = debug.getinfo(2, "S").source:sub(2) - return str:match("(.*/)") + return str:match(("(.*%s)"):format(lib.files.sep)) end local python_script = (Path.new(script_path()):parent():parent() / "neotest.py").filename @@ -66,7 +66,7 @@ end local PythonNeotestAdapter = { name = "neotest-python" } PythonNeotestAdapter.root = - lib.files.match_root_pattern("pyproject.toml", "setup.cfg", "mypy.ini", "pytest.ini", "setup.py") +lib.files.match_root_pattern("pyproject.toml", "setup.cfg", "mypy.ini", "pytest.ini", "setup.py") function PythonNeotestAdapter.is_test_file(file_path) return is_test_file(file_path)