You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

conftest.py 531B

12345678910111213141516171819
  1. import os
  2. # Getting the absolute path of the current file's directory
  3. ABS_PATH = os.path.dirname(os.path.abspath(__file__))
  4. # Getting the absolute path of the project's root directory
  5. PROJECT_DIR = os.path.abspath(os.path.join(ABS_PATH, os.pardir, os.pardir))
  6. # Loading the .env file if it exists
  7. def _load_env() -> None:
  8. dotenv_path = os.path.join(PROJECT_DIR, "tests", "integration_tests", ".env")
  9. if os.path.exists(dotenv_path):
  10. from dotenv import load_dotenv
  11. load_dotenv(dotenv_path)
  12. _load_env()