mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-01-31 11:54:30 +01:00
fix(benchmark): Unbreak -N/--attempts option
This commit is contained in:
@@ -158,7 +158,7 @@ class BuiltinChallenge(BaseChallenge):
|
||||
self,
|
||||
config: AgentBenchmarkConfig,
|
||||
request: pytest.FixtureRequest,
|
||||
i_attempt: int = 0,
|
||||
i_attempt: int,
|
||||
) -> None:
|
||||
# if os.environ.get("HELICONE_API_KEY"):
|
||||
# from helicone.lock import HeliconeLockManager
|
||||
|
||||
@@ -377,7 +377,7 @@ class WebArenaChallenge(BaseChallenge):
|
||||
self,
|
||||
config: AgentBenchmarkConfig,
|
||||
request: pytest.FixtureRequest,
|
||||
i_attempt: int = 0,
|
||||
i_attempt: int,
|
||||
) -> None:
|
||||
if not self._spec.available:
|
||||
pytest.skip(self._spec.unavailable_reason)
|
||||
|
||||
@@ -216,8 +216,8 @@ def pytest_sessionfinish(session: pytest.Session) -> None:
|
||||
|
||||
|
||||
def pytest_generate_tests(metafunc: pytest.Metafunc):
|
||||
if type(n := metafunc.config.getoption("-N")) is str:
|
||||
metafunc.parametrize("i_attempt", range(int(n)))
|
||||
n = metafunc.config.getoption("-N")
|
||||
metafunc.parametrize("i_attempt", range(int(n)) if type(n) is str else [0])
|
||||
|
||||
|
||||
def pytest_collection_modifyitems(
|
||||
|
||||
Reference in New Issue
Block a user