Skip to content

Commit 79acfce

Browse files
committed
test: had a check for the env file in integration tests
1 parent ee72f1f commit 79acfce

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/integration/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
"""Integration tests."""
2+
import os
23

34
from dotenv import load_dotenv
45

5-
load_dotenv("pytest.env")
6+
dotenv_file = "pytest.env"
7+
if not os.path.isfile(dotenv_file):
8+
raise FileNotFoundError(f"Tests: File '{dotenv_file}' not found.")
9+
10+
load_dotenv(dotenv_file)
611
print("Loaded pytest.env")
712

813
import logging

0 commit comments

Comments
 (0)