nvim-neotest / nvim-neotest/neotest-python

neotest-python not working with unittest

Open
#64 3 comments 0 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

This is my neotest setup:
require("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 = {
justMyCode = false,
console = "integratedTerminal",
},
args = { "--log-level", "DEBUG", "--quiet" },
runner = "unittest",
})
}
I am able to get it to work with pytest, but I can't figure out how to use it with unittest. What am I doing wrong?

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 with the neotest-python adapter configuration shown, reproducing the setup with runner set to unittest and comparing it with the working pytest configuration. The payload names no source files or tests, so first identify the adapter entry point and capture the unittest failure. Done means unittest tests are discoverable and runnable through the configured adapter.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, python
Domain
testing-qa, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.