nvim-neotest / nvim-neotest/neotest-python

Custom cwd and envs support

Open
#72 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
192
Forks
60
PR merge metrics
No merged PRs in 30d

Description

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',
        })
    }
})

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the adapter's dap configuration is passed from the setup shown in the issue, with attention to the custom cwd and env values. Use the linked debugpy configuration reference and the pytest runner context to determine the expected behavior; done means both settings are honored when tests are run or debugged.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, neovim, python
Domain
testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.