Skip to content

No test found with unittest framework #94

@TheScianf

Description

@TheScianf

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:

Screencast.from.2025-03-19.11-51-00.webm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions