Skip to content

Commit

Permalink
Fix config file path
Browse files Browse the repository at this point in the history
  • Loading branch information
koenvo committed Aug 16, 2024
1 parent c66857b commit 3660ea0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions ingestify/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ def datastore_dir():
os.environ["TEST_DIR"] = tmpdirname
os.environ["INGESTIFY_RUN_EAGER"] = "true"
yield tmpdirname


@pytest.fixture(scope="session")
def config_file():
return os.path.abspath(os.path.dirname(__file__) + "/config.yaml")
8 changes: 4 additions & 4 deletions ingestify/tests/test_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ def fetch_dataset_files(
}


def test_engine():
engine = get_engine("config.yaml", "main")
def test_engine(config_file):
engine = get_engine(config_file, "main")

add_extract_job(
engine, SimpleFakeSource("fake-source"), competition_id=1, season_id=2
Expand Down Expand Up @@ -170,12 +170,12 @@ def test_engine():
assert len(datasets) == 1


def test_iterator_source():
def test_iterator_source(config_file):
"""Test when a Source returns a Iterator to do Batch processing.
Every batch must be executed right away.
"""
engine = get_engine("config.yaml", "main")
engine = get_engine(config_file, "main")

batch_source = None

Expand Down

0 comments on commit 3660ea0

Please sign in to comment.