Skip to content

Commit

Permalink
refactor(test): inject Model instance
Browse files Browse the repository at this point in the history
  • Loading branch information
aaraney committed Aug 15, 2024
1 parent 9f33123 commit bcc4252
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions python/ngen_cal/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import json
import pandas as pd # type: ignore
import geopandas as gpd # type: ignore
from ngen.cal.configuration import General
from ngen.cal.configuration import General, Model
from ngen.cal.ngen import Ngen
from ngen.cal.meta import JobMeta
from ngen.cal.calibration_cathment import CalibrationCatchment
Expand Down Expand Up @@ -104,9 +104,10 @@ def meta(ngen_config, general_config, mocker) -> Generator[JobMeta, None, None]:
yield m

@pytest.fixture
def agent(ngen_config, general_config) -> Generator['Agent', None, None]:
a = Agent(ngen_config.__root__.dict(), general_config.workdir, general_config.log)
yield a
def agent(ngen_config, general_config) -> Agent:
model = Model(model=ngen_config)
a = Agent(model, general_config.workdir, general_config.log)
return a

@pytest.fixture
def eval(ngen_config) -> Generator[EvaluationOptions, None, None]:
Expand Down

0 comments on commit bcc4252

Please sign in to comment.