Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module 'neotest-python' not found #77

Closed
norpadon opened this issue Jun 25, 2024 · 1 comment
Closed

module 'neotest-python' not found #77

norpadon opened this issue Jun 25, 2024 · 1 comment

Comments

@norpadon
Copy link

I am getting an error when trying to install it using Lazy:

{
  'nvim-neotest/neotest',
  dependencies = {
    'nvim-neotest/nvim-nio',
    'nvim-lua/plenary.nvim',
    'antoinemadec/FixCursorHold.nvim',
    'nvim-treesitter/nvim-treesitter',
  },
  config = function()
    require('neotest').setup {
      adapters = {
        require 'neotest-python' {
          dap = { justMyCode = false },
          args = { '--log-level', 'DEBUG' },
          runner = 'pytest',
          pytest_discover_instances = true,
        },
      },
    }
  end,
}

results in the following error

Failed to run `config` for neotest

/Users/norpadon/.config/nvim/lua/custom/plugins/neotest.lua:13: module 'neotest-python' not found:
^Ino field package.preload['neotest-python']
cache_loader: module neotest-python not found
cache_loader_lib: module neotest-python not found
^Ino file './neotest-python.lua'
^Ino file '/opt/homebrew/share/luajit-2.1/neotest-python.lua'
^Ino file '/usr/local/share/lua/5.1/neotest-python.lua'
^Ino file '/usr/local/share/lua/5.1/neotest-python/init.lua'
^Ino file '/opt/homebrew/share/lua/5.1/neotest-python.lua'
^Ino file '/opt/homebrew/share/lua/5.1/neotest-python/init.lua'
^Ino file './neotest-python.so'
^Ino file '/usr/local/lib/lua/5.1/neotest-python.so'
^Ino file '/opt/homebrew/lib/lua/5.1/neotest-python.so'
^Ino file '/usr/local/lib/lua/5.1/loadall.so'

# stacktrace:
  - .config/nvim/lua/custom/plugins/neotest.lua:13 _in_ **config**
  - .config/nvim/init.lua:238
@airreality
Copy link

From neotest docs (https://github.com/nvim-neotest/neotest):

To get started you will also need to install an adapter for your test runner.

There is no neotest-python dependency in your config. Just add it:

  dependencies = {
    'nvim-neotest/nvim-nio',
    'nvim-lua/plenary.nvim',
    'antoinemadec/FixCursorHold.nvim',
    'nvim-treesitter/nvim-treesitter',
    'nvim-neotest/neotest-python',
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants