nvim-neotest / neotest-python

MIT License
137 stars 40 forks source link

Custom cwd and envs support #72

Open akvilary opened 8 months ago

akvilary commented 8 months ago

Dears, Is neotest-python support to set custom cwd and envs by config? If I set them in dap then it does not work. My config

local neotest = require('neotest')
neotest.setup({
    adapters = {
        require("neotest-python")({
            -- Extra arguments for nvim-dap configuration
            -- See https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for values
            dap = {
                env = my_envs,
                cwd = '/tmp/tests/my_project/src',
                redirectOutput = true,
                showReturnValue = true,
                justMyCode = true,
            },
            runner = "pytest",
            python = '/opt/python3.11/bin/python3.11',
        })
    }
})