nvim-neotest / nvim-neotest/neotest-python

No test found with unittest framework

Open
#94 1 comment 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

I've just configured neotest but while unittest from cli works, no test seems to be found.
This is my neotest config (lazy plugin manager):

return {
  'nvim-neotest/neotest',
  dependencies = {
    'nvim-neotest/nvim-nio',
    'nvim-lua/plenary.nvim',
    'antoinemadec/FixCursorHold.nvim',
    'nvim-treesitter/nvim-treesitter',
    'nvim-neotest/neotest-python',
    'rcasia/neotest-java',
  },
  opts = {
    adapters = {
      ['neotest-java'] = {},
      ['neotest-python'] = { runner = 'unittest' },
    },
  },
} 

This is my neovim version:

NVIM v0.11.0-dev
Build type: RelWithDebInfo
LuaJIT 2.1.1703358377
Run "nvim -V1 -v" for more info

Here an example:

Folder Structure

  • src
    • something.py
    • init.py
  • tests
    • test_something.py
    • init.py
  • init.py

Here I'm running :Neotest summary command and I'm getting the same result with the other commands:

https://github.com/user-attachments/assets/7e214e55-c542-4e52-ac0e-025bb95a8200

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

Reproduce the report with the supplied project layout, Neovim configuration, and neotest-python unittest runner. Start by checking how unittest discovery is invoked for tests/test_something.py; done means the tests appear in the Neotest summary and related commands while unittest from the CLI continues to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, python
Domain
testing, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.