Pytest for Neovim
11 comments
·April 5, 2025nickjj
What happens if your test produces a bunch of stdout, such as using `print(...)` somewhere? Where would it be displayed?
A couple of questions about Docker based on the README:
> enabled = true, -- Enable docker support
What does this do in the end? Is it starting containers or adjusting which test command gets run by prefixing a Docker command?
If so is there a way to opt out of that to have it still use Docker commands without it managing container lifecycles?
> docker_path = '/usr/src/app', -- This is the default path, if you use docker compose this is obtained from the docker compose file
How is this being read from that file? Are you reading a volume?
Is this meant to be what the WORKDIR is set to?
> docker_path_prefix = 'app', -- This is the prefix for the path in the cwd in your local, for example: root/app/<docker_app_content>
Is this meant to be what the WORKDIR is set to or what the COMPOSE_PROJECT would be set to?
> container = 'app-1', -- Container where the tests will be run
Will this be ignored in favor of the compose service name if compose is set to true?
> docker_compose_file = 'docker-compose.yml', -- This is the default docker compose file name
The default name has been compose.yaml for a long time now btw, you may want to support both out of the box.
> enable_docker_compose = true, -- Enable docker compose support
What does this do vs not having it enabled?
Jackevansevo
For the longest time I've been using vims built-in `compiler` feature with tartansandal/vim-compiler-pytest combined tpope/vim-dispatch
ryan-duve
Could you share an example of a workflow using the built in feature to run tests in Vim?
eterps
Nice. Might be good to add to the README what you intend to improve on: https://github.com/nvim-neotest/neotest?tab=readme-ov-file
semiinfinitely
neovim is dead to me and yet I still spend ~hours a week configuring my editor to behave the way I want. whats wrong with me send help
null
ohduran
This is so helpful, congrats!
meitham
Very nice! Congrats on your release!
Very cool integration of neovim with pytest! I also am using neovim with python integration for my hobby project, vimgolf.ai , where I try to teach vim motions to those who haven't used vim. Only two levels so far, but hoping to increase that count in the near future.