nvim-neotest / neotest-python

MIT License
137 stars 40 forks source link

dap strategy: empty console and noise in the repl #50

Open azmeuk opened 1 year ago

azmeuk commented 1 year ago

Hi. I am not really which neovim plugin is responsible for this behavior, but I can move this issue elsewhere if this does not fall on the side of neotest-python.

Why a pretty default configuration, running a test with lua require("neotest").run.run({strategy = "dap"}) displays:

Capture d’écran du 2023-07-17 17-59-06

I am not sure this is wanted. Naively I would have expected all the output in the console.

my configuration ```lua vim.cmd [[packadd packer.nvim]] return require('packer').startup(function(use) -- Packer can manage itself use 'wbthomason/packer.nvim' -- syntax highlighting use { 'nvim-treesitter/nvim-treesitter', run = function() local ts_update = require('nvim-treesitter.install').update({ with_sync = true }) ts_update() end, } -- display the current functions/loops etc use "nvim-treesitter/nvim-treesitter-context" -- basic configuration to use LSP use { 'VonHeikemen/lsp-zero.nvim', branch = 'v2.x', requires = { -- LSP Support {'neovim/nvim-lspconfig'}, { 'williamboman/mason.nvim', build = function() pcall(vim.cmd, 'MasonUpdate') end, }, {'williamboman/mason-lspconfig.nvim'}, -- Autocompletion {'hrsh7th/nvim-cmp'}, {'hrsh7th/cmp-buffer'}, {'hrsh7th/cmp-path'}, {'saadparwaiz1/cmp_luasnip'}, {'hrsh7th/cmp-nvim-lsp'}, {'hrsh7th/cmp-nvim-lua'}, -- Snippets {'L3MON4D3/LuaSnip'}, {'rafamadriz/friendly-snippets'}, } } -- unit tests with vim use { "nvim-neotest/neotest", requires = { "nvim-lua/plenary.nvim", "nvim-treesitter/nvim-treesitter", "antoinemadec/FixCursorHold.nvim", "nvim-neotest/neotest-python", } } -- debugger protocol use 'mfussenegger/nvim-dap' use 'mfussenegger/nvim-dap-python' use 'theHamsta/nvim-dap-virtual-text' -- in file variable inspection text use { "rcarriga/nvim-dap-ui", requires = {"mfussenegger/nvim-dap"} } -- complete debug UI use 'LiadOz/nvim-dap-repl-highlights' -- syntax highlighting in the dap REPL use 'rcarriga/cmp-dap' -- autocompletion in the dap REPL -- checking, doc, and completions use 'folke/neodev.nvim' end) local dap = require('dap') require("neotest").setup({ adapters = { require("neotest-python")({ dap = { django = true, jinja = true, justMyCode = false, redirectOutput = true, showReturnValue = true, }, }), } }) require('dap-python').setup() ```

Any idea if this is a configuration issue, a bug in neotest or neotest python, something in the nvim-dap or nvim-dap-python side or even in debugpy?