neotest-python icon indicating copy to clipboard operation
neotest-python copied to clipboard

Container Support

Open ddkasa opened this issue 2 years ago • 3 comments

Is there a possibility of adding container support for running tests inside a docker/podman instance. For example running a command like $ docker compose run --rm django coverage run -m pytest with Neotest and viewing results inside Neovim?

I see there is nvim-neotest/neotest#89 which shows a workaround for rspec, but this extension would need a bigger workaround it seems.

ddkasa avatar Mar 26 '24 15:03 ddkasa

Came here looking for answers :(

Are there any work arounds ?

Would love to be able to just run docker compose up

Then docker compose exec pytest with neotest.

Rich107 avatar Dec 04 '24 22:12 Rich107

I haven't been able to get this integrated into neotest directly, but I've had some success with https://github.com/esensar/nvim-dev-container and just running pytest as a command inside the devcontainer. It ends up printing test output in a new tab rather than the nice neotest UI, but was good enough for me.

navignaw avatar Dec 07 '24 16:12 navignaw

Implemented support for docker containers - https://github.com/nvim-neotest/neotest-python/pull/104

diidiiman avatar Sep 15 '25 19:09 diidiiman