-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
yml test file breaks pytest test discovery #22668
Comments
Can you run the test discovery manually from the terminal using |
Sure. With the file:
Without the file:
The difference is the presence of
|
Will investigate thanks! |
Hello, one follow up question: did this work before the testing rewrite? You can check by opting out of the rewrite by setting this in your user settings: |
@eleanorjboyd Enabling that setting fixes the issue! |
Hi @tinChe- I am looking at this on the rewrite because we are going to turn the experiment off soon and that will remove the possibility to opt out from the experiment. Can you send an example yml file? I am using this one but pytest isn't able to discover it. Do you have a conftest.py that allows for this discovery to work similar to this: https://docs.pytest.org/en/7.1.x/example/nonpython.html? Thanks |
Hello! I am closing this issue since we have not heard back on the above question, please comment with the requested information if you are still experiencing this problem and I can re-open it. Thanks |
Howdy.
I'm using pytest for my project. Recently I've started using the pytest mypy plugins plugin to write some of my tests as Mypy snippets in a .yml file. So my test directory now has a bunch of .py files and one .yml file. This yml file is properly converted into test cases by pytest and this particular plugin.
But it looks like the presence of this file breaks VS Code test collection. When this file is present, I don't see tests from subdirectories of
tests/
in the Testing tab. If I remove the file, all test cases get shown.Output with the file present:
Output without the file present:
I imagine the presence of
stops the parser in some way?
Environment data
The text was updated successfully, but these errors were encountered: