nickjmiller / pytest-fixtures

Pytest fixtures autocomplete for vscode
https://marketplace.visualstudio.com/items?itemName=nickmillerdev.pytest-fixtures
MIT License
21 stars 9 forks source link

A Suggestion to Improve UX #41

Open sentient6 opened 1 year ago

sentient6 commented 1 year ago

First of all: @nickjmiller thank you so much for your contribution, which is a huge help to me!

May I suggest to consider using the python.testing.cwd setting parameter?

I found in the Output that pytest-fixtures is running on the VS Code project's working directory, which appears to be the same approach the Python extension is taking in order to discover tests - which does not work for the folder structure of my project, so I am using its python.testing.cwd setting in order to point to my test root directory.

pytest-fixtures could provide the option to use python.testing.cwd as well. Should you want to introduce such an option, I believe it needs to be false by default in order not to confuse existing installations.

Instead, should this suggestion not work with your product vision, the docs could suggest that providing pytest's --rootdir option in pytest-fixtures.extraArguments can help. (For me, this would duplicate settings, as --rootdir and python.testing.cwd would effectively be pointing to the very same location.)

nickjmiller commented 1 year ago

Thank you for the suggestion, I won't have time to work on this soon but when I have a chance I'll add it.