-
Notifications
You must be signed in to change notification settings - Fork 41
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
No tests are being recognized within test files #83
Comments
+1 getting this too after upgrading my nvim/neotest/neotest-pytest. Can't quite figure out which upgrade caused the regression |
Yeah - I was suspecting this could be an issue in neotest proper as well, but just haven't spent enough time to figure out which. |
I had this bug on nightly build. when moving to |
is that v0.10.0 of neotest? or neotest-python? if you're able to do any testing that might help track whether this is a bug in neotest or neotest-python |
sounds like he was talking about neovim version. BTW I'm also facing this issue on neovim 0.10.2 NOTE: After reinstalled properly it works, steps:
|
For me, this issue had to do with an outdated version of |
Same issue on 0.10.2, all my Neotest adapters work fine, except Python for some reason. But what is really funny, if I navigate into a Rust file with a test in it, and run the tests, then when I go back into the python file with tests and run them - neotest runs them 😅. If I make any test to fail, I can see python adapter actually reporting the test failure. Otherwise I always see "No tests found" message. |
I think I found the root cause of this issue. If you just add one of the following files into the root folder, even an empty one:
which I had none of, then tests should be discovered and you should be able to run them. At least it started working for me. The issue was in |
It seems no tests within files are being discovered - when running file, or running nearest, or debugging nearest the result is "No tests found" from neotest. The test file, however, does show up in the summary window, but shows a "skipped" icon next to it when run.
I created a fresh venv with python 3.12, and installed just pytest 8.3.3, and implemented their getting started:
Running
pytest
yields the following, expected, output:Here's my output of
nvim -v
:And I'm running LazyVim - here's the lazy-lock.json lines for neotest:
and the rest of my configuration is here: https://github.com/a3ng7n/nvim
The text was updated successfully, but these errors were encountered: