0

I am using:

from dotenv import load_dotenv
from os import getenv
load_dotenv("config/.env")

in a project which uses the pytest & selenium package.

I use getenv("example_string") at various points in this file which imports from a .env file.

The getenv()s work when I run the pytest command through the command-line. However, the getenv()s all return None when I run pytest through Pycharm's 'play button' like in the picture below:

enter image description here

How can I get the play button to work too?

tonitone120
  • 1,920
  • 3
  • 8
  • 25

0 Answers0