Closed lgrosser-tiplu closed 4 years ago
If you use pytest from the console, do you use a virtualenv and did you install pytest-dotenv to that virtualenv?
You can run pip freeze
from the console to see which packages are available to you / have been installed to the current python executable.
I am using virtualenv and installed pytest-dotenv==0.4.0
to the virtual environment from within I am starting the shell commando.
Can you provide an example project to replicate this and help you out?
I just solved it. My pytest.ini and .env file was not in the root directory of the repository. Thank you for this useful plugin. This issue can be closed.
It's good to mention that you can specify dirname/your.env
in .ini file, too.
Hi, I am using Pycharm 2019.3.1, the package works great when I start pytest by using right-click on the respective test folder from within Pycharm, all environment variables are found and used. However, if I start pytest from the console, the variables are not found. Am I missing a cli parameter that tells pytest to use pytest-dotenv?