Skip to content

Commit

Permalink
Improved pytest entry point to handle env automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
ga84jog committed Sep 18, 2024
1 parent ce0f933 commit 8f857fc
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
# ============================================================================
# Sets up environment variables
# ============================================================================
from dotenv import load_dotenv

load_dotenv(dotenv_path=".env", override=True)
load_dotenv(dotenv_path="../.env", override=True)

# ============================================================================
# Set up system Path
# ============================================================================
import sys
import os

sys.path.extend({*os.environ["PYTHONPATH"].split(":")} - set(sys.path))

# ============================================================================
# Begin configuration
# ============================================================================

import shutil
import pytest
import os
import datasets
import ray
from typing import Dict
from tests.tsettings import *
from typing import Dict
from utils.IO import *
from datasets.readers import ExtractedSetReader, ProcessedSetReader
from settings import *
Expand Down

0 comments on commit 8f857fc

Please sign in to comment.