-
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
Pytest args --rootdir is broken #16079
Comments
Can you try separating the arguments? we might be trying to look for
|
@karthiknadig this is because |
I am also experiencing this issue (original issue #14795). |
I'm having the same issue too. The current workaround that I found is having 'conftest.py' in the project root. |
Copied from #9553 (comment) During test discovery and running tests, it seems that vscode-python/src/client/testing/testController/pytest/arguments.ts Lines 137 to 141 in b6c0d3e
Looking at the pytest docs for My naive suggestion would be to remove the
|
Hi everyone, I am just posting what worked for me since I had the same issue and Google landed me here.
in the
Then I Cmd + Shift + P and invoked Pytest: Configure Tests, telling it to follow the pre-existing Cheers ! |
Hello! We have just finished our testing rewrite and are beginning the roll out to users. If you are able, it would be very helpful to know if your issue still exists on the rewrite! To try it yourself, add this setting to your users You can confirm you have the rewrite enabled by setting I have tried |
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off. Happy Coding! |
Due to the usage of docker-compose my python app is in a subdirectory of the workspace therefore I want to do something like this:
but this does not work as expected. Since the
--rootdir
option is passed to pytest by default with the workspace location, vscode executes thisIn other words the custom rootdir option becomes the argument and "tests" is completely ignored.
The text was updated successfully, but these errors were encountered: